All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ftp.linux.org.uk>
To: JANAK DESAI <janak@us.ibm.com>
Cc: chrisw@osdl.org, dwmw2@infradead.org, jamie@shareable.org,
	serue@us.ibm.com, mingo@elte.hu, linuxram@us.ibm.com,
	jmorris@namei.org, sds@tycho.nsa.gov, akpm@osdl.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH -mm 1/9] unshare system call : system call handler function sys_unshare
Date: Tue, 13 Dec 2005 13:43:47 +0000	[thread overview]
Message-ID: <20051213134347.GN27946@ftp.linux.org.uk> (raw)
In-Reply-To: <1134441680.14136.5.camel@hobbs.atlanta.ibm.com>

On Mon, Dec 12, 2005 at 09:59:50PM -0500, JANAK DESAI wrote:
> +		task_lock(current);
> +
> +		if (new_fs) {
> +			fs = current->fs;
> +			current->fs = new_fs;
> +			put_fs_struct(fs);

Nope.  You can't drop those under a spinlock; leave the pointer e.g. in
new_fs and drop everything after task_unlock().  Incidentally, it allows
to merge cleanup for normal and failure exits.

      reply	other threads:[~2005-12-13 13:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-13  2:59 [PATCH -mm 1/9] unshare system call : system call handler function sys_unshare JANAK DESAI
2005-12-13 13:43 ` Al Viro [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20051213134347.GN27946@ftp.linux.org.uk \
    --to=viro@ftp.linux.org.uk \
    --cc=akpm@osdl.org \
    --cc=chrisw@osdl.org \
    --cc=dwmw2@infradead.org \
    --cc=jamie@shareable.org \
    --cc=janak@us.ibm.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxram@us.ibm.com \
    --cc=mingo@elte.hu \
    --cc=sds@tycho.nsa.gov \
    --cc=serue@us.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.