Weekly Edition Return to the Kernel page |
v2.6.22.24-op1
I announced the v2.6.22.24-op1 "stable" kernel. gitweb: http://repo.or.cz/w/linux-2.6.22.y-op.git git-tree: git://repo.or.cz/linux-2.6.22.y-op.git patches-gitweb : http://repo.or.cz/w/linux-2.6.22.y-op-patches.git tar-bz2: http://students.zipernowsky.hu/~oliverp/kernel-stable/v2.... patch: http://students.zipernowsky.hu/~oliverp/kernel-stable/pat... incr-patch: http://students.zipernowsky.hu/~oliverp/kernel-stable/inc... chlog: http://students.zipernowsky.hu/~oliverp/kernel-stable/chl... --- Al Viro (1): Fix dnotify/close race Li Zefan (1): ACPI: check a return value correctly in acpi_power_get_context() Oliver Pinter (1): v2.6.22.24-op1 --- Makefile | 2 +- drivers/acpi/power.c | 2 +- fs/dnotify.c | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) -- Thanks, Oliver --- diff --git a/Makefile b/Makefile index d001959..2a69b9b 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 22 -EXTRAVERSION = .23-op1 +EXTRAVERSION = .24-op1 NAME = Holy Dancing Manatees, Batman! # *DOCUMENTATION* diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c index 4ffecd1..d295ed1 100644 --- a/drivers/acpi/power.c +++ b/drivers/acpi/power.c @@ -116,7 +116,7 @@ acpi_power_get_context(acpi_handle handle, } *resource = acpi_driver_data(device); - if (!resource) + if (!*resource) return -ENODEV; return 0; diff --git a/fs/dnotify.c b/fs/dnotify.c index 936409f..91b9753 100644 --- a/fs/dnotify.c +++ b/fs/dnotify.c @@ -20,6 +20,7 @@ #include <linux/init.h> #include <linux/spinlock.h> #include <linux/slab.h> +#include <linux/file.h> int dir_notify_enable __read_mostly = 1; @@ -66,6 +67,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) struct dnotify_struct **prev; struct inode *inode; fl_owner_t id = current->files; + struct file *f; int error = 0; if ((arg & ~DN_MULTISHOT) == 0) { @@ -92,6 +94,15 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg) prev = &odn->dn_next; } + rcu_read_lock(); + f = fcheck(fd); + rcu_read_unlock(); + /* we'd lost the race with close(), sod off silently */ + /* note that inode->i_lock prevents reordering problems + * between accesses to descriptor table and ->i_dnotify */ + if (f != filp) + goto out_free; + error = __f_setown(filp, task_pid(current), PIDTYPE_PID, 0); if (error) goto out_free; |
Copyright © 2008, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds
Powered by Rackspace Managed Hosting.