From: Wengang <wen.gang.wang@oracle.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] bonding: clear header_ops when last slave detached (v2)
Date: Wed, 19 Nov 2014 15:00:50 +0800 [thread overview]
Message-ID: <546C4022.5010509@oracle.com> (raw)
In-Reply-To: <1416375565.14060.43.camel@edumazet-glaptop2.roam.corp.google.com>
Hi Eric,
于 2014年11月19日 13:39, Eric Dumazet 写道:
> On Wed, 2014-11-19 at 13:18 +0800, Wengang Wang wrote:
>> When last slave of a bonding master is removed, the bonding then does not work.
>> When packet_snd is called against with a master net_device, it accesses
>> header_ops. In case the header_ops is not valid any longer(say ipoib module
>> unloaded), it will then access an invalid memory address.
>> This patch try to fix this issue by clearing header_ops when last slave
>> detached.
>>
>> Signed-off-by: Wengang Wang <wen.gang.wang@oracle.com>
>> ---
>> drivers/net/bonding/bond_main.c | 1 +
>> 1 file changed, 1 insertion(+)
> It seems you basically ignored my feedback.
>
>
>
> Some code is doing :
>
> [A] if (dev->header_ops) {
> ...
> [B] dev->header_ops->XXX()
>
>
>
> Nothing prevents you doing the clear after [A] , and before [B]
>
Yes, that's true. So the simplest way is move ipoib_header_ops to vmlinux.
thanks for review.
wengang
next prev parent reply other threads:[~2014-11-19 6:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-19 5:18 [PATCH] bonding: clear header_ops when last slave detached (v2) Wengang Wang
2014-11-19 5:22 ` Wengang
2014-11-19 5:39 ` Eric Dumazet
2014-11-19 7:00 ` Wengang [this message]
2014-11-19 22:26 ` Cong Wang
2014-11-19 22:56 ` Cong Wang
2014-11-20 6:41 ` Eric Dumazet
2014-11-20 17:34 ` Cong Wang
2014-11-20 20:41 ` Eric Dumazet
2014-11-20 21:57 ` Cong Wang
2014-11-20 22:03 ` Eric Dumazet
2014-11-20 22:13 ` Cong Wang
2014-11-20 22:53 ` Jay Vosburgh
2014-11-21 18:17 ` Cong Wang
2014-11-21 18:54 ` Jay Vosburgh
2014-11-24 3:05 ` Wengang
2014-11-21 18:55 ` 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=546C4022.5010509@oracle.com \
--to=wen.gang.wang@oracle.com \
--cc=eric.dumazet@gmail.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).