rename patch (v2.6.22.24-op1)
[linux-2.6.22.y-op-patches.git] / patch-2.6.22.y / incr / patch-v2.6.22.23-op1-v2.6.22.24-op1
blob67f93886c0310fb5ee4c92347c84ae521dc32295
1 diff --git a/Makefile b/Makefile
2 index d001959..2a69b9b 100644
3 --- a/Makefile
4 +++ b/Makefile
5 @@ -1,7 +1,7 @@
6  VERSION = 2
7  PATCHLEVEL = 6
8  SUBLEVEL = 22
9 -EXTRAVERSION = .23-op1
10 +EXTRAVERSION = .24-op1
11  NAME = Holy Dancing Manatees, Batman!
13  # *DOCUMENTATION*
14 diff --git a/drivers/acpi/power.c b/drivers/acpi/power.c
15 index 4ffecd1..d295ed1 100644
16 --- a/drivers/acpi/power.c
17 +++ b/drivers/acpi/power.c
18 @@ -116,7 +116,7 @@ acpi_power_get_context(acpi_handle handle,
19         }
21         *resource = acpi_driver_data(device);
22 -       if (!resource)
23 +       if (!*resource)
24                 return -ENODEV;
26         return 0;
27 diff --git a/fs/dnotify.c b/fs/dnotify.c
28 index 936409f..91b9753 100644
29 --- a/fs/dnotify.c
30 +++ b/fs/dnotify.c
31 @@ -20,6 +20,7 @@
32  #include <linux/init.h>
33  #include <linux/spinlock.h>
34  #include <linux/slab.h>
35 +#include <linux/file.h>
37  int dir_notify_enable __read_mostly = 1;
39 @@ -66,6 +67,7 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
40         struct dnotify_struct **prev;
41         struct inode *inode;
42         fl_owner_t id = current->files;
43 +       struct file *f;
44         int error = 0;
46         if ((arg & ~DN_MULTISHOT) == 0) {
47 @@ -92,6 +94,15 @@ int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
48                 prev = &odn->dn_next;
49         }
51 +       rcu_read_lock();
52 +       f = fcheck(fd);
53 +       rcu_read_unlock();
54 +       /* we'd lost the race with close(), sod off silently */
55 +       /* note that inode->i_lock prevents reordering problems
56 +        * between accesses to descriptor table and ->i_dnotify */
57 +       if (f != filp)
58 +               goto out_free;
60         error = __f_setown(filp, task_pid(current), PIDTYPE_PID, 0);
61         if (error)
62                 goto out_free;