mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
net: delete /proc THIS_MODULE references
/proc has been ignoring struct file_operations::owner field for 10 years.
Specifically, it started with commit 786d7e1612
("Fix rmmod/read/write races in /proc entries"). Notice the chunk where
inode->i_fop is initialized with proxy struct file_operations for
regular files:
- if (de->proc_fops)
- inode->i_fop = de->proc_fops;
+ if (de->proc_fops) {
+ if (S_ISREG(inode->i_mode))
+ inode->i_fop = &proc_reg_file_ops;
+ else
+ inode->i_fop = de->proc_fops;
+ }
VFS stopped pinning module at this point.
Signed-off-by: Alexey Dobriyan <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
868717ae73
commit
96890d6252
61 changed files with 0 additions and 96 deletions
|
|
@ -4214,7 +4214,6 @@ static int if6_seq_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations if6_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = if6_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -533,7 +533,6 @@ static int ac6_seq_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations ac6_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = ac6_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -836,7 +836,6 @@ static int ip6fl_seq_release(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations ip6fl_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = ip6fl_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -477,7 +477,6 @@ static int ip6mr_vif_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations ip6mr_vif_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = ip6mr_vif_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
@ -609,7 +608,6 @@ static int ipmr_mfc_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations ip6mr_mfc_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = ipmr_mfc_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -2758,7 +2758,6 @@ static int igmp6_mc_seq_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations igmp6_mc_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = igmp6_mc_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
@ -2913,7 +2912,6 @@ static int igmp6_mcf_seq_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations igmp6_mcf_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = igmp6_mcf_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -58,7 +58,6 @@ static int sockstat6_seq_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations sockstat6_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = sockstat6_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
@ -248,7 +247,6 @@ static int snmp6_seq_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations snmp6_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = snmp6_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
@ -274,7 +272,6 @@ static int snmp6_dev_seq_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations snmp6_dev_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = snmp6_dev_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -1308,7 +1308,6 @@ static int raw6_seq_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations raw6_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = raw6_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -4648,7 +4648,6 @@ static int ip6_route_dev_notify(struct notifier_block *this,
|
|||
#ifdef CONFIG_PROC_FS
|
||||
|
||||
static const struct file_operations ipv6_route_proc_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = ipv6_route_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
@ -4676,7 +4675,6 @@ static int rt6_stats_seq_open(struct inode *inode, struct file *file)
|
|||
}
|
||||
|
||||
static const struct file_operations rt6_stats_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = rt6_stats_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -1883,7 +1883,6 @@ out:
|
|||
}
|
||||
|
||||
static const struct file_operations tcp6_afinfo_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = tcp_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -1479,7 +1479,6 @@ int udp6_seq_show(struct seq_file *seq, void *v)
|
|||
}
|
||||
|
||||
static const struct file_operations udp6_afinfo_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = udp_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
|
|
@ -94,7 +94,6 @@ void udplitev6_exit(void)
|
|||
#ifdef CONFIG_PROC_FS
|
||||
|
||||
static const struct file_operations udplite6_afinfo_seq_fops = {
|
||||
.owner = THIS_MODULE,
|
||||
.open = udp_seq_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
|
|
|
|||
Loading…
Reference in a new issue