netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Chad Tindel <ctindel@users.sourceforge.net>,
	Jay Vosburgh <fubar@us.ibm.com>,
	"David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH 2.5.71] Fix module owner for bonding driver
Date: Mon, 16 Jun 2003 15:42:51 -0700	[thread overview]
Message-ID: <20030616154251.28c3e3ee.shemminger@osdl.org> (raw)

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) {

             reply	other threads:[~2003-06-16 22:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-06-16 22:42 Stephen Hemminger [this message]
2003-06-16 23:10 ` [PATCH 2.5.71] Fix module owner for bonding driver David S. Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20030616154251.28c3e3ee.shemminger@osdl.org \
    --to=shemminger@osdl.org \
    --cc=ctindel@users.sourceforge.net \
    --cc=davem@redhat.com \
    --cc=fubar@us.ibm.com \
    --cc=netdev@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).