From: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
To: Michael Chan <mchan@broadcom.com>
Cc: "'Simon Horman'" <horms@verge.net.au>,
"davem@davemloft.net" <davem@davemloft.net>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 3/6] cnic: Fix panic in cnic_iscsi_nl_msg_recv() when device is down.
Date: Fri, 26 Feb 2010 10:40:01 -0800 [thread overview]
Message-ID: <20100226184001.GJ6733@linux.vnet.ibm.com> (raw)
In-Reply-To: <C27F8246C663564A84BB7AB34397724218312F8FD0@IRVEXCHCCR01.corp.ad.broadcom.com>
On Thu, Feb 25, 2010 at 11:01:59PM -0800, Michael Chan wrote:
> Simon Horman wrote:
>
> > On Wed, Feb 24, 2010 at 04:42:06PM -0800, Michael Chan wrote:
> > > Some data structures are freed when the device is down and it will
> > > crash if an ISCSI netlink message is received. Add RCU protection
> > > to prevent this. In the shutdown path, ulp_ops[CNIC_ULP_L4] is
> > > assigned NULL and rcu_synchronized before freeing the data
> > > structures.
> >
> > Is rcu_assign_pointer() unnecessary in cnic_cm_open()?
> > It doesn't seem to be followed by rcu_synchronized() and the pointer
> > doesn't seem to be accessible anywhere else at that time.
>
> We assign a valid pointer in cnic_cm_open() so that it can be used
> during run-time (in service_kcqes() for example). During shutdown in
> cnic_stop_hw(), we assign NULL followed by rcu_synchronize().
So you are saying that when the pointer is assigned in cnic_cm_open(),
there cannot possibly be any concurrent reading threads?
Use of an explicit rcu_assign_pointer() would be better if so.
Thanx, Paul
next prev parent reply other threads:[~2010-02-26 18:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-25 0:42 [PATCH net-next 1/6] cnic: Finetune iSCSI connection set up Michael Chan
2010-02-25 0:42 ` [PATCH net-next 2/6] cnic: Finetune iSCSI connection reset Michael Chan
2010-02-25 0:42 ` [PATCH net-next 3/6] cnic: Fix panic in cnic_iscsi_nl_msg_recv() when device is down Michael Chan
2010-02-25 0:42 ` [PATCH net-next 4/6] cnic: Simplify route checking during iSCSI connection Michael Chan
2010-02-25 0:42 ` [PATCH net-next 5/6] cnic: Use union for the status blocks of different devices Michael Chan
2010-02-25 0:42 ` [PATCH net-next 6/6] cnic: Update version to 2.1.1 Michael Chan
2010-02-26 10:11 ` David Miller
2010-02-26 10:11 ` [PATCH net-next 5/6] cnic: Use union for the status blocks of different devices David Miller
2010-02-26 10:11 ` [PATCH net-next 4/6] cnic: Simplify route checking during iSCSI connection David Miller
2010-02-26 0:51 ` [PATCH net-next 3/6] cnic: Fix panic in cnic_iscsi_nl_msg_recv() when device is down Simon Horman
2010-02-26 7:01 ` Michael Chan
2010-02-26 18:40 ` Paul E. McKenney [this message]
2010-02-26 19:11 ` Michael Chan
2010-02-26 19:33 ` Paul E. McKenney
2010-02-26 10:11 ` David Miller
2010-02-26 10:11 ` [PATCH net-next 2/6] cnic: Finetune iSCSI connection reset David Miller
2010-02-26 10:11 ` [PATCH net-next 1/6] cnic: Finetune iSCSI connection set up David 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=20100226184001.GJ6733@linux.vnet.ibm.com \
--to=paulmck@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=horms@verge.net.au \
--cc=mchan@broadcom.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 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).