Re: [PATCH -mm 1/9] unshare system call : system call handler function sys_unshare

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux