mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-31 12:10:52 -04:00
Merge branch 'bkl/procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/procfs' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing: sunrpc: Include missing smp_lock.h procfs: Kill the bkl in ioctl procfs: Push down the bkl from ioctl procfs: Use generic_file_llseek in /proc/vmcore procfs: Use generic_file_llseek in /proc/kmsg procfs: Use generic_file_llseek in /proc/kcore procfs: Kill BKL in llseek on proc base
This commit is contained in:
commit
98c89cdd3a
8 changed files with 55 additions and 16 deletions
|
|
@ -730,6 +730,7 @@ out_no_task:
|
|||
|
||||
static const struct file_operations proc_info_file_operations = {
|
||||
.read = proc_info_read,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
|
||||
static int proc_single_show(struct seq_file *m, void *v)
|
||||
|
|
@ -987,6 +988,7 @@ out_no_task:
|
|||
|
||||
static const struct file_operations proc_environ_operations = {
|
||||
.read = environ_read,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
|
||||
static ssize_t oom_adjust_read(struct file *file, char __user *buf,
|
||||
|
|
@ -1060,6 +1062,7 @@ static ssize_t oom_adjust_write(struct file *file, const char __user *buf,
|
|||
static const struct file_operations proc_oom_adjust_operations = {
|
||||
.read = oom_adjust_read,
|
||||
.write = oom_adjust_write,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_AUDITSYSCALL
|
||||
|
|
@ -1131,6 +1134,7 @@ out_free_page:
|
|||
static const struct file_operations proc_loginuid_operations = {
|
||||
.read = proc_loginuid_read,
|
||||
.write = proc_loginuid_write,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
|
||||
static ssize_t proc_sessionid_read(struct file * file, char __user * buf,
|
||||
|
|
@ -1151,6 +1155,7 @@ static ssize_t proc_sessionid_read(struct file * file, char __user * buf,
|
|||
|
||||
static const struct file_operations proc_sessionid_operations = {
|
||||
.read = proc_sessionid_read,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
@ -1202,6 +1207,7 @@ static ssize_t proc_fault_inject_write(struct file * file,
|
|||
static const struct file_operations proc_fault_inject_operations = {
|
||||
.read = proc_fault_inject_read,
|
||||
.write = proc_fault_inject_write,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
@ -1943,7 +1949,7 @@ static ssize_t proc_fdinfo_read(struct file *file, char __user *buf,
|
|||
}
|
||||
|
||||
static const struct file_operations proc_fdinfo_file_operations = {
|
||||
.open = nonseekable_open,
|
||||
.open = nonseekable_open,
|
||||
.read = proc_fdinfo_read,
|
||||
};
|
||||
|
||||
|
|
@ -2227,6 +2233,7 @@ out_no_task:
|
|||
static const struct file_operations proc_pid_attr_operations = {
|
||||
.read = proc_pid_attr_read,
|
||||
.write = proc_pid_attr_write,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
|
||||
static const struct pid_entry attr_dir_stuff[] = {
|
||||
|
|
@ -2347,6 +2354,7 @@ static ssize_t proc_coredump_filter_write(struct file *file,
|
|||
static const struct file_operations proc_coredump_filter_operations = {
|
||||
.read = proc_coredump_filter_read,
|
||||
.write = proc_coredump_filter_write,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -232,9 +232,9 @@ static long proc_reg_unlocked_ioctl(struct file *file, unsigned int cmd, unsigne
|
|||
if (rv == -ENOIOCTLCMD)
|
||||
rv = -EINVAL;
|
||||
} else if (ioctl) {
|
||||
lock_kernel();
|
||||
WARN_ONCE(1, "Procfs ioctl handlers must use unlocked_ioctl, "
|
||||
"%pf will be called without the Bkl held\n", ioctl);
|
||||
rv = ioctl(file->f_path.dentry->d_inode, file, cmd, arg);
|
||||
unlock_kernel();
|
||||
}
|
||||
|
||||
pde_users_dec(pde);
|
||||
|
|
|
|||
|
|
@ -558,6 +558,7 @@ static int open_kcore(struct inode *inode, struct file *filp)
|
|||
static const struct file_operations proc_kcore_operations = {
|
||||
.read = read_kcore,
|
||||
.open = open_kcore,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
|
||||
#ifdef CONFIG_MEMORY_HOTPLUG
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ static const struct file_operations proc_kmsg_operations = {
|
|||
.poll = kmsg_poll,
|
||||
.open = kmsg_open,
|
||||
.release = kmsg_release,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
|
||||
static int __init proc_kmsg_init(void)
|
||||
|
|
|
|||
|
|
@ -163,6 +163,7 @@ static ssize_t read_vmcore(struct file *file, char __user *buffer,
|
|||
|
||||
static const struct file_operations proc_vmcore_operations = {
|
||||
.read = read_vmcore,
|
||||
.llseek = generic_file_llseek,
|
||||
};
|
||||
|
||||
static struct vmcore* __init get_new_element(void)
|
||||
|
|
|
|||
Loading…
Reference in a new issue