From: Eric Dumazet <eric.dumazet@gmail.com>
To: "Abodunrin, Akeem G" <akeem.g.abodunrin@intel.com>
Cc: "Kirsher, Jeffrey T" <jeffrey.t.kirsher@intel.com>,
"Duyck, Alexander H" <alexander.h.duyck@intel.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"gospo@redhat.com" <gospo@redhat.com>,
"sassmann@redhat.com" <sassmann@redhat.com>
Subject: RE: [net-next 07/10] igb: Added rcu_lock to avoid race
Date: Wed, 26 Jun 2013 12:52:41 -0700 [thread overview]
Message-ID: <1372276361.3301.208.camel@edumazet-glaptop> (raw)
In-Reply-To: <CFEEE81102D91947B9CC368106979EBA4388266B@ORSMSX105.amr.corp.intel.com>
On Wed, 2013-06-26 at 16:42 +0000, Abodunrin, Akeem G wrote:
>
> > -----Original Message-----
> > From: Eric Dumazet [mailto:eric.dumazet@gmail.com]
> > Sent: Wednesday, June 26, 2013 4:20 AM
> > To: Kirsher, Jeffrey T
> > Cc: davem@davemloft.net; Abodunrin, Akeem G; netdev@vger.kernel.org;
> > gospo@redhat.com; sassmann@redhat.com
> > Subject: Re: [net-next 07/10] igb: Added rcu_lock to avoid race
> >
> > On Wed, 2013-06-26 at 03:55 -0700, Jeff Kirsher wrote:
> > > From: "Akeem G. Abodunrin" <akeem.g.abodunrin@intel.com>
> > >
> > > This patch adds rcu_lock to avoid possible race condition with
> > > igb_update_stats function accessing the rings in free_ q_vector.
> > >
> > > Signed-off-by: Akeem G Abodunrin <akeem.g.abodunrin@intel.com>
> > > Tested-by: Aaron Brown <aaron.f.brown@intel.com>
> > > Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
> > > ---
> > > drivers/net/ethernet/intel/igb/igb_main.c | 7 ++++++-
> > > 1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/net/ethernet/intel/igb/igb_main.c
> > > b/drivers/net/ethernet/intel/igb/igb_main.c
> > > index 7112e52..c74ad78 100644
> > > --- a/drivers/net/ethernet/intel/igb/igb_main.c
> > > +++ b/drivers/net/ethernet/intel/igb/igb_main.c
> > > @@ -705,6 +705,8 @@ static void __exit igb_exit_module(void)
> > > dca_unregister_notify(&dca_notifier);
> > > #endif
> > > pci_unregister_driver(&igb_driver);
> > > +
> > > + rcu_barrier(); /* Wait for completion of call_rcu()'s */
> > > }
> > >
> >
> > This is not needed.
> >
> > If this is really needed, a better comment would be welcomed ;)
>
> Thanks Eric!
>
> I believe we need this to make sure memory is released before removing
> driver code from the kernel, especially with each call to rcu - that
> is the reason for the comment "Wait for completion of call_rcu()'s".
You did not add call_rcu() in this patch, therefore you do not need
this.
I am extra careful of people adding useless rcu synchronization just
because they feel better :)
next prev parent reply other threads:[~2013-06-26 19:52 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-26 10:55 [net-next 00/10][pull request] Intel Wired LAN Driver Updates Jeff Kirsher
2013-06-26 10:55 ` [net-next 01/10] ixgbe: Retain VLAN filtering in promiscuous + VT mode Jeff Kirsher
2013-06-26 10:55 ` [net-next 02/10] ixgbe: Use pci_vfs_assigned instead of ixgbe_vfs_are_assigned Jeff Kirsher
2013-06-26 10:55 ` [net-next 03/10] ixgbe: Fix typo Jeff Kirsher
2013-06-26 14:51 ` Joe Perches
2013-06-26 10:55 ` [net-next 04/10] e100: dump small buffers via %*ph Jeff Kirsher
2013-06-26 10:55 ` [net-next 05/10] igb: Reset the link when EEE setting changed Jeff Kirsher
2013-06-26 10:55 ` [net-next 06/10] igb: Read register for latch_on without return value Jeff Kirsher
2013-06-26 10:55 ` [net-next 07/10] igb: Added rcu_lock to avoid race Jeff Kirsher
2013-06-26 11:20 ` Eric Dumazet
2013-06-26 16:42 ` Abodunrin, Akeem G
2013-06-26 19:52 ` Eric Dumazet [this message]
2013-06-26 19:58 ` Eric Dumazet
2013-06-26 10:55 ` [net-next 08/10] igb: don't allow SR-IOV without MSI-X Jeff Kirsher
2013-06-26 10:55 ` [net-next 09/10] e1000e: restore call to pci_clear_master() Jeff Kirsher
2013-06-26 10:55 ` [net-next 10/10] e1000e: Remove duplicate assignment of default rx/tx ring size Jeff Kirsher
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=1372276361.3301.208.camel@edumazet-glaptop \
--to=eric.dumazet@gmail.com \
--cc=akeem.g.abodunrin@intel.com \
--cc=alexander.h.duyck@intel.com \
--cc=davem@davemloft.net \
--cc=gospo@redhat.com \
--cc=jeffrey.t.kirsher@intel.com \
--cc=netdev@vger.kernel.org \
--cc=sassmann@redhat.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