aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorEric W. Biederman <ebiederm@xmission.com>2007-02-14 03:33:35 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-14 11:09:56 -0500
commit4b998d4f6e559fb8eba8141263b2fddc9556391b (patch)
tree0d18c4954908192c3d9bdc5e2a6431e17050d320 /drivers
parent208367eeec8d6f6fcee1a0672af2149aeee7b658 (diff)
[PATCH] sysctl: cdrom: don't set de->owner
There is no need for open files in /proc/sys/XXX to hold a reference count on the module that provides the file to prevent module unload races. While there is code active in the module p->used in the sysctl_table_header is incremented, preventing the sysctl from being unregisted. Once the sysctl is unregistered it cannot be found. Open files are also not a problem as they revalidate the sysctl information and bump p->used before accessing module code. So setting de->owner is unnecessary, makes for a bad example and gets in my way of removing ctl_table->de. Signed-off-by: Eric W. Biederman <ebiederm@xmission.com> Acked-by: Jens Axboe <jens.axboe@oracle.com> Acked-by: James Bottomley <James.Bottomley@SteelEye.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cdrom/cdrom.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index f0a68017a175..14f72c477acc 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -3554,8 +3554,6 @@ static void cdrom_sysctl_register(void)
3554 return; 3554 return;
3555 3555
3556 cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 0); 3556 cdrom_sysctl_header = register_sysctl_table(cdrom_root_table, 0);
3557 if (cdrom_root_table->ctl_name && cdrom_root_table->child->de)
3558 cdrom_root_table->child->de->owner = THIS_MODULE;
3559 3557
3560 /* set the defaults */ 3558 /* set the defaults */
3561 cdrom_sysctl_settings.autoclose = autoclose; 3559 cdrom_sysctl_settings.autoclose = autoclose;