From: Pradeep Satyanarayana <pradeeps-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
To: Roland Dreier <roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Mike Marciniszyn
<mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org>,
linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
gary.leshner-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org,
tom.elken-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org
Subject: Re: [PATCH] IPoIB: fix faulty list maintenance in path and neigh list
Date: Thu, 17 Feb 2011 11:52:53 -0800 [thread overview]
Message-ID: <4D5D7C95.5010408@linux.vnet.ibm.com> (raw)
In-Reply-To: <AANLkTim-BnQ9tM68eGsCoOVYDRonmEOO6JN+EFT2zdff-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
On 02/16/2011 05:15 PM, Roland Dreier wrote:
> On Wed, Feb 16, 2011 at 4:51 PM, Pradeep Satyanarayana
> <pradeeps-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org> wrote:
>> The list_move_tail() in ipoib_mcast_restart_task() is conditional. So it
>> feasible that mcast->list is not moved to the remove_list, but the
>> ipoib_neigh structure is freed. A subsequent call to ipoib_mcast_free() from
>> context of dev_close() tries to free the same ipoib_neigh() structure which
>> might cause the crash.
>
> I'm missing something. ipoib_neigh_free() is only called in
> ipoib_mcast_free(). ipoib_mcast_free() is only called on entries in
> remove_list. So if an mcast structure is not moved to the
> remove_list, I don't see how an ipoib_neigh struct on its list could
> be freed.
Yes, that is the crux of the issue. I had missed that ipoib_mcast_free()
is only called on remove_list.
>
> We do all manipulation of the mcast list in ipoib_mcast_restart_task()
> and ipoib_mcast_dev_flush() with priv->lock held, so I don't see how
> we could free the same mcast struct twice, or free an ipoib_neigh
> struct without freeing its corresponding mcast struct.
>
> Indeed it's not clear to me why we need to take the lock in
> ipoib_mcast_free() or what it could be protecting against -- that
> seems like it must be wrong and unnecessary (and the locking predates
> git history).
>
> Sorry if I'm being slow but if this patch is fixing some test, it
> really seems that it must be doing that by making a race window
> smaller or something like that, rather than actually being the right
> fix for the underlying problem.
While we are discussing IPoIB issues, how about the two other issues
that I illustrated previously. One was Ralph Campbell's patch for fixes
to ipoib_cm_start_rx_drain() and my questions wrt ipoib_neigh_cleanup()?
Thanks
Pradeep
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-02-17 19:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 16:12 [PATCH] IPoIB: fix faulty list maintenance in path and neigh list Mike Marciniszyn
[not found] ` <20110201161247.12671.10028.stgit-hIFRcJ1SNwcXGO8/Qfapyjg/wwJxntczYPYVAmT7z5s@public.gmane.org>
2011-02-15 18:24 ` Roland Dreier
[not found] ` <AANLkTin1pudSXZCGY31p2GnY6noWi2DS3y2+Gprj0+ug-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-17 0:51 ` Pradeep Satyanarayana
[not found] ` <4D5C70F6.3050604-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2011-02-17 1:15 ` Roland Dreier
[not found] ` <AANLkTim-BnQ9tM68eGsCoOVYDRonmEOO6JN+EFT2zdff-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-17 19:52 ` Pradeep Satyanarayana [this message]
[not found] ` <4D5D7C95.5010408-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2011-02-17 23:23 ` Roland Dreier
[not found] ` <AANLkTinyUjhZE_-n8zPJyGLVobaoFVnQ=iC1QMusQH+y-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2011-02-17 23:34 ` Mike Marciniszyn
[not found] ` <35AAF1E4A771E142979F27B51793A4888838446B0D-HolNjIBXvBOXx9kJd3VG2h2eb7JE58TQ@public.gmane.org>
2011-02-19 2:07 ` Pradeep Satyanarayana
-- strict thread matches above, loose matches on Subject: below --
2011-02-11 18:09 Pradeep Satyanarayana
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=4D5D7C95.5010408@linux.vnet.ibm.com \
--to=pradeeps-23vcf4htsmix0ybbhkvfkdbpr1lh4cv8@public.gmane.org \
--cc=gary.leshner-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
--cc=mike.marciniszyn-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.org \
--cc=roland-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
--cc=tom.elken-h88ZbnxC6KDQT0dZR+AlfA@public.gmane.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.