Skip to content

Commit c2f9805

Browse files
committed
procfs: Kill the bkl in ioctl
There are no more users of procfs that implement the ioctl callback. Drop the bkl from this path and warn on any use of this callback. Signed-off-by: Frederic Weisbecker <[email protected]> Cc: Arnd Bergmann <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: John Kacur <[email protected]> Cc: KAMEZAWA Hiroyuki <[email protected]> Cc: Al Viro <[email protected]>
1 parent d79b6f4 commit c2f9805

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/proc/inode.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -231,9 +231,9 @@ static long proc_reg_unlocked_ioctl(struct file *file, unsigned int cmd, unsigne
231231
if (rv == -ENOIOCTLCMD)
232232
rv = -EINVAL;
233233
} else if (ioctl) {
234-
lock_kernel();
234+
WARN_ONCE(1, "Procfs ioctl handlers must use unlocked_ioctl, "
235+
"%pf will be called without the Bkl held\n", ioctl);
235236
rv = ioctl(file->f_path.dentry->d_inode, file, cmd, arg);
236-
unlock_kernel();
237237
}
238238

239239
pde_users_dec(pde);

0 commit comments

Comments
 (0)