From: Jean Tourrilhes <jt@bougret.hpl.hp.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: "David S. Miller" <davem@redhat.com>,
irda-users@lists.sourceforge.net, netdev@oss.sgi.com
Subject: Re: [PATCH] (1/4) remove hashbin from irlan
Date: Mon, 18 Aug 2003 12:00:46 -0700 [thread overview]
Message-ID: <20030818190046.GA6577@bougret.hpl.hp.com> (raw)
In-Reply-To: <20030818113936.205b5632.shemminger@osdl.org>
On Mon, Aug 18, 2003 at 11:39:36AM -0700, Stephen Hemminger wrote:
> The locking in hashbin_delete is a problem since unregister_netdevice
> can't be called with locks held in 2.6.0-test3.
>
> Replace it with simpler list macros.
> Insertion/deletion protected with RTNL semaphore, and read
> uses RCU.
>
> Don't have client hardware to test, but load/unload works on SMP.
Why don't you try the much simpler version :
----------------------------------------------
--- irlan_common.h1.c Mon Aug 18 11:57:39 2003
+++ irlan_common.c Mon Aug 18 11:58:25 2003
@@ -125,7 +125,7 @@ int __init irlan_init(void)
IRDA_DEBUG(0, "%s()\n", __FUNCTION__ );
/* Allocate master structure */
- irlan = hashbin_new(HB_LOCK); /* protect from /proc */
+ irlan = hashbin_new(HB_NOLOCK); /* network layer will protect us */
if (irlan == NULL) {
printk(KERN_WARNING "IrLAN: Can't allocate hashbin!\n");
return -ENOMEM;
----------------------------------------------
We would still need the RCU, but the overall patch would be
much simpler and safer IMHO. But it's up to you ;-)
Have fun...
Jean
next prev parent reply other threads:[~2003-08-18 19:00 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-08-18 18:39 [PATCH] (1/4) remove hashbin from irlan Stephen Hemminger
2003-08-18 19:00 ` Jean Tourrilhes [this message]
2003-08-18 19:34 ` Stephen Hemminger
2003-08-20 4:13 ` 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=20030818190046.GA6577@bougret.hpl.hp.com \
--to=jt@bougret.hpl.hp.com \
--cc=davem@redhat.com \
--cc=irda-users@lists.sourceforge.net \
--cc=jt@hpl.hp.com \
--cc=netdev@oss.sgi.com \
--cc=shemminger@osdl.org \
/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).