* [PATCH 2.5.71] Fix module owner for bonding driver
@ 2003-06-16 22:42 Stephen Hemminger
2003-06-16 23:10 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Stephen Hemminger @ 2003-06-16 22:42 UTC (permalink / raw)
To: Chad Tindel, Jay Vosburgh, David S. Miller; +Cc: netdev
The bonding driver does explicit MOD_INC/DEC even though it does a SET_MODULE_OWNER.
So it doesn't changes module use counts on open/close on 2.5 when it shouldn't.
It also has a /proc entry which does not affect the module use counts when it should.
Suggestion: the /proc interface could/should be converted to seq_file.
Volunteers? Janitor project?
diff -Nru a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
--- a/drivers/net/bonding/bond_main.c Mon Jun 16 15:24:37 2003
+++ b/drivers/net/bonding/bond_main.c Mon Jun 16 15:24:37 2003
@@ -952,8 +952,6 @@
add_timer(alb_timer);
}
- MOD_INC_USE_COUNT;
-
if (miimon > 0) { /* link check interval, in milliseconds. */
init_timer(timer);
timer->expires = jiffies + (miimon * HZ / 1000);
@@ -1027,7 +1025,6 @@
bond_alb_deinitialize(bond);
}
- MOD_DEC_USE_COUNT;
return 0;
}
@@ -3694,6 +3691,8 @@
kfree(bond);
return -ENOMEM;
}
+ bond->bond_proc_dir->owner = THIS_MODULE;
+
bond->bond_proc_info_file =
create_proc_info_entry("info", 0, bond->bond_proc_dir,
bond_get_info);
@@ -3705,6 +3704,7 @@
kfree(bond);
return -ENOMEM;
}
+ bond->bond_proc_info_file->owner = THIS_MODULE;
#endif /* CONFIG_PROC_FS */
if (first_pass == 1) {
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 2.5.71] Fix module owner for bonding driver
2003-06-16 22:42 [PATCH 2.5.71] Fix module owner for bonding driver Stephen Hemminger
@ 2003-06-16 23:10 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2003-06-16 23:10 UTC (permalink / raw)
To: shemminger; +Cc: ctindel, fubar, netdev
From: Stephen Hemminger <shemminger@osdl.org>
Date: Mon, 16 Jun 2003 15:42:51 -0700
The bonding driver does explicit MOD_INC/DEC even though it does a
SET_MODULE_OWNER. So it doesn't changes module use counts on
open/close on 2.5 when it shouldn't. It also has a /proc entry
which does not affect the module use counts when it should.
Applied, thanks Stephen.
Suggestion: the /proc interface could/should be converted to seq_file.
Volunteers? Janitor project?
There is a bonding maintainer, maybe that'd be the best bet :-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-06-16 23:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-06-16 22:42 [PATCH 2.5.71] Fix module owner for bonding driver Stephen Hemminger
2003-06-16 23:10 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).