From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Cc: netdev@vger.kernel.org
Subject: Re: [patch 1/2] qeth: new qeth device driver
Date: Mon, 11 Feb 2008 09:11:32 -0800 [thread overview]
Message-ID: <20080211171132.GB9652@linux.vnet.ibm.com> (raw)
In-Reply-To: <47AFFF7D.70101@linux.vnet.ibm.com>
On Mon, Feb 11, 2008 at 08:55:41AM +0100, Frank Blaschka wrote:
> Paul E. McKenney schrieb:
> > On Fri, Feb 08, 2008 at 03:10:00PM +0100, Frank.Blaschka@de.ibm.com wrote:
> >> From: Frank Blaschka <frank.blaschka@de.ibm.com>
> >>
> >> List of major changes and improvements:
> >> no manipulation of the global ARP constructor
> >> clean code split into core, layer 2 and layer 3 functionality
> >> better exploitation of the ethtool interface
> >> better representation of the various hardware capabilities
> >> fix packet socket support (tcpdump), no fake_ll required
> >> osasnmpd notification via udev events
> >> coding style and beautification
> >
> > One question below...
> >
> >> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
> >> ---
> >
> > [ . . . ]
> >
> >> +static void qeth_l3_vlan_rx_add_vid(struct net_device *dev, unsigned short vid)
> >> +{
> >> + struct net_device *vlandev;
> >> + struct qeth_card *card = (struct qeth_card *) dev->priv;
> >> + struct in_device *in_dev;
> >> +
> >> + if (card->info.type == QETH_CARD_TYPE_IQD)
> >> + return;
> >> +
> >> + vlandev = vlan_group_get_device(card->vlangrp, vid);
> >> + vlandev->neigh_setup = qeth_l3_neigh_setup;
> >> +
> >> + in_dev = __in_dev_get_rcu(vlandev);
> >
> > Is this really in an RCU read-side critical section? Or is this just
> > using common code?
> >
> > Thanx, Paul
> > --
> > To unsubscribe from this list: send the line "unsubscribe netdev" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
>
> Hi Paul,
>
> thanks for pointing at this. Using __in_dev_get_rcu without the rcu lock
> is probably a bug at this place (right?).
It would be a bug -unless- you are holding the update-side lock.
> Using in_dev_get/in_dev_put
> would be more appropriate. Same for qeth_l3_free_vlan_addresses4(), here
> we take the rcu read lock, but in_dev_get/in_dev_put would be the better
> choice. What do you think?
Ummm... "It depends." ;-)
Keeping in mind that I am not an expert on this part of the kernel, I
would guess that qeth_l3_free_vlan_addresses4() is not particularly
performance-sensitive, so I don't see any reason in_dev_get/in_dev_put
would be a problem. If it turns out that qeth_l3_free_vlan_addresses4()
is in fact performance-sensitive, then rcu_read_lock()/rcu_read_unlock()
would be a better choice.
Thanx, Paul
next prev parent reply other threads:[~2008-02-11 17:11 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-08 14:09 [patch 0/2] s390: new qeth driver for 2.6.25 Frank.Blaschka
2008-02-08 14:10 ` [patch 1/2] qeth: new qeth device driver Frank.Blaschka
2008-02-08 15:54 ` Paul E. McKenney
2008-02-11 7:55 ` Frank Blaschka
2008-02-11 17:11 ` Paul E. McKenney [this message]
2008-02-11 16:00 ` Jeff Garzik
2008-02-08 14:10 ` [patch 2/2] qeth: remove old qeth files Frank.Blaschka
-- strict thread matches above, loose matches on Subject: below --
2008-02-15 8:19 [patch 0/2] [RESEND] s390: new qeth driver for 2.6.26 frank.blaschka
2008-02-15 8:19 ` [patch 1/2] qeth: new qeth device driver frank.blaschka
2008-03-05 11:14 ` Jeff Garzik
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=20080211171132.GB9652@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=blaschka@linux.vnet.ibm.com \
--cc=netdev@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.