diff options
-rw-r--r-- | drivers/char/nvram.c | 3 | ||||
-rw-r--r-- | include/linux/irq.h | 2 | ||||
-rw-r--r-- | kernel/futex_compat.c | 6 |
3 files changed, 4 insertions, 7 deletions
diff --git a/drivers/char/nvram.c b/drivers/char/nvram.c index fdbcc9fd6d31..5eb83c3ca20d 100644 --- a/drivers/char/nvram.c +++ b/drivers/char/nvram.c | |||
@@ -336,14 +336,12 @@ static int nvram_ioctl(struct inode *inode, struct file *file, | |||
336 | 336 | ||
337 | static int nvram_open(struct inode *inode, struct file *file) | 337 | static int nvram_open(struct inode *inode, struct file *file) |
338 | { | 338 | { |
339 | lock_kernel(); | ||
340 | spin_lock(&nvram_state_lock); | 339 | spin_lock(&nvram_state_lock); |
341 | 340 | ||
342 | if ((nvram_open_cnt && (file->f_flags & O_EXCL)) || | 341 | if ((nvram_open_cnt && (file->f_flags & O_EXCL)) || |
343 | (nvram_open_mode & NVRAM_EXCL) || | 342 | (nvram_open_mode & NVRAM_EXCL) || |
344 | ((file->f_mode & FMODE_WRITE) && (nvram_open_mode & NVRAM_WRITE))) { | 343 | ((file->f_mode & FMODE_WRITE) && (nvram_open_mode & NVRAM_WRITE))) { |
345 | spin_unlock(&nvram_state_lock); | 344 | spin_unlock(&nvram_state_lock); |
346 | unlock_kernel(); | ||
347 | return -EBUSY; | 345 | return -EBUSY; |
348 | } | 346 | } |
349 | 347 | ||
@@ -354,7 +352,6 @@ static int nvram_open(struct inode *inode, struct file *file) | |||
354 | nvram_open_cnt++; | 352 | nvram_open_cnt++; |
355 | 353 | ||
356 | spin_unlock(&nvram_state_lock); | 354 | spin_unlock(&nvram_state_lock); |
357 | unlock_kernel(); | ||
358 | 355 | ||
359 | return 0; | 356 | return 0; |
360 | } | 357 | } |
diff --git a/include/linux/irq.h b/include/linux/irq.h index 451481c082b5..d13492df57a1 100644 --- a/include/linux/irq.h +++ b/include/linux/irq.h | |||
@@ -90,7 +90,7 @@ struct msi_desc; | |||
90 | * @startup: start up the interrupt (defaults to ->enable if NULL) | 90 | * @startup: start up the interrupt (defaults to ->enable if NULL) |
91 | * @shutdown: shut down the interrupt (defaults to ->disable if NULL) | 91 | * @shutdown: shut down the interrupt (defaults to ->disable if NULL) |
92 | * @enable: enable the interrupt (defaults to chip->unmask if NULL) | 92 | * @enable: enable the interrupt (defaults to chip->unmask if NULL) |
93 | * @disable: disable the interrupt (defaults to chip->mask if NULL) | 93 | * @disable: disable the interrupt |
94 | * @ack: start of a new interrupt | 94 | * @ack: start of a new interrupt |
95 | * @mask: mask an interrupt source | 95 | * @mask: mask an interrupt source |
96 | * @mask_ack: ack and mask an interrupt source | 96 | * @mask_ack: ack and mask an interrupt source |
diff --git a/kernel/futex_compat.c b/kernel/futex_compat.c index 235716556bf1..d49afb2395e5 100644 --- a/kernel/futex_compat.c +++ b/kernel/futex_compat.c | |||
@@ -146,7 +146,7 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr, | |||
146 | struct task_struct *p; | 146 | struct task_struct *p; |
147 | 147 | ||
148 | ret = -ESRCH; | 148 | ret = -ESRCH; |
149 | read_lock(&tasklist_lock); | 149 | rcu_read_lock(); |
150 | p = find_task_by_vpid(pid); | 150 | p = find_task_by_vpid(pid); |
151 | if (!p) | 151 | if (!p) |
152 | goto err_unlock; | 152 | goto err_unlock; |
@@ -157,7 +157,7 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr, | |||
157 | !capable(CAP_SYS_PTRACE)) | 157 | !capable(CAP_SYS_PTRACE)) |
158 | goto err_unlock; | 158 | goto err_unlock; |
159 | head = p->compat_robust_list; | 159 | head = p->compat_robust_list; |
160 | read_unlock(&tasklist_lock); | 160 | rcu_read_unlock(); |
161 | } | 161 | } |
162 | 162 | ||
163 | if (put_user(sizeof(*head), len_ptr)) | 163 | if (put_user(sizeof(*head), len_ptr)) |
@@ -165,7 +165,7 @@ compat_sys_get_robust_list(int pid, compat_uptr_t __user *head_ptr, | |||
165 | return put_user(ptr_to_compat(head), head_ptr); | 165 | return put_user(ptr_to_compat(head), head_ptr); |
166 | 166 | ||
167 | err_unlock: | 167 | err_unlock: |
168 | read_unlock(&tasklist_lock); | 168 | rcu_read_unlock(); |
169 | 169 | ||
170 | return ret; | 170 | return ret; |
171 | } | 171 | } |