Commit 0f4533979473a456a8adb3869365e12c7a99cf65

Authored by Linus Torvalds

Merge branches 'futexes-for-linus', 'irq-core-for-linus' and 'bkl-drivers-for-li…

…nus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'futexes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  futex: Protect pid lookup in compat code with RCU

* 'irq-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  genirq: Fix documentation of default chip disable()

* 'bkl-drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  nvram: Drop the BKL from nvram_open()

Showing 3 changed files Side-by-side Diff

drivers/char/nvram.c
... ... @@ -336,14 +336,12 @@
336 336  
337 337 static int nvram_open(struct inode *inode, struct file *file)
338 338 {
339   - lock_kernel();
340 339 spin_lock(&nvram_state_lock);
341 340  
342 341 if ((nvram_open_cnt && (file->f_flags & O_EXCL)) ||
343 342 (nvram_open_mode & NVRAM_EXCL) ||
344 343 ((file->f_mode & FMODE_WRITE) && (nvram_open_mode & NVRAM_WRITE))) {
345 344 spin_unlock(&nvram_state_lock);
346   - unlock_kernel();
347 345 return -EBUSY;
348 346 }
349 347  
... ... @@ -354,7 +352,6 @@
354 352 nvram_open_cnt++;
355 353  
356 354 spin_unlock(&nvram_state_lock);
357   - unlock_kernel();
358 355  
359 356 return 0;
360 357 }
... ... @@ -90,7 +90,7 @@
90 90 * @startup: start up the interrupt (defaults to ->enable if NULL)
91 91 * @shutdown: shut down the interrupt (defaults to ->disable if NULL)
92 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 94 * @ack: start of a new interrupt
95 95 * @mask: mask an interrupt source
96 96 * @mask_ack: ack and mask an interrupt source
kernel/futex_compat.c
... ... @@ -146,7 +146,7 @@
146 146 struct task_struct *p;
147 147  
148 148 ret = -ESRCH;
149   - read_lock(&tasklist_lock);
  149 + rcu_read_lock();
150 150 p = find_task_by_vpid(pid);
151 151 if (!p)
152 152 goto err_unlock;
... ... @@ -157,7 +157,7 @@
157 157 !capable(CAP_SYS_PTRACE))
158 158 goto err_unlock;
159 159 head = p->compat_robust_list;
160   - read_unlock(&tasklist_lock);
  160 + rcu_read_unlock();
161 161 }
162 162  
163 163 if (put_user(sizeof(*head), len_ptr))
... ... @@ -165,7 +165,7 @@
165 165 return put_user(ptr_to_compat(head), head_ptr);
166 166  
167 167 err_unlock:
168   - read_unlock(&tasklist_lock);
  168 + rcu_read_unlock();
169 169  
170 170 return ret;
171 171 }