]> err.no Git - linux-2.6/commit
scsi: use non-racy method for proc entries creation
authorDenis V. Lunev <den@openvz.org>
Tue, 29 Apr 2008 08:02:17 +0000 (01:02 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 29 Apr 2008 15:06:21 +0000 (08:06 -0700)
commita973909fc32be90884280b7a8cd2f2e093c97890
tree32ceca146f9a6de03bb7cf91a141d0f445da04ab
parent16e70f64a9358133a14872eb72cf39b6f38b6212
scsi: use non-racy method for proc entries creation

Use proc_create() to make sure that ->proc_fops be setup before gluing PDE to
main tree.

Add correct ->owner to proc_fops to fix reading/module unloading race.

Signed-off-by: Denis V. Lunev <den@openvz.org>
Cc: Greg Kroah-Hartman <gregkh@suse.de>
Cc: Alexey Dobriyan <adobriyan@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/scsi/scsi_proc.c
drivers/scsi/sg.c