From: Ying Xue <ying.xue@windriver.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: <netdev@vger.kernel.org>, <davem@davemloft.net>
Subject: Re: [PATCH net-next] neigh: fix a possible leak issue of neigh entry
Date: Wed, 13 May 2015 18:32:37 +0800 [thread overview]
Message-ID: <55532845.8010709@windriver.com> (raw)
In-Reply-To: <5552FC4D.3060200@windriver.com>
On 05/13/2015 03:25 PM, Ying Xue wrote:
> On 05/13/2015 02:20 PM, Eric Dumazet wrote:
>> Have you hit this condition ?
>>
>
> No, I just found the issue when I was reading the code.
>
>> If yes, there is a bug elsewhere and we need to fix it, not trying to
>> recover.
>>
After a search, it's found your mentioned bug probably should be:
https://patchwork.ozlabs.org/patch/458112/
But I think the bug should be a different issue that the patch is to be
resolved. When the bug happened, neigh_add_timer() would take a reference on an
object that already had a refcount of zero, which means somebody already
decreased the refcount to zero before neigh_add_timer() was called. So, the bug
should be unrelated to neigh_add_timer() although the bug really needs to be
fixed. But the issue the patch tries to fix is wrong because it obviously
violates the generic usage of how to take an object refcount in the object's
timer handler as well as when its timer is started or deleted. Specially when a
neighbour's timer to be modified is in pending state, we should not take its
refcount, otherwise, the neighbour is leaked forever.
Therefore, the patch is needed for us even if your mentioned bug is not fixed.
Regards,
Ying
>
> Sorry, I don't know its relevant story, so can you please give some hints?
>
> Thanks,
> Ying
>
> --
> 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
>
next prev parent reply other threads:[~2015-05-13 10:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-13 5:43 [PATCH net-next] neigh: fix a possible leak issue of neigh entry Ying Xue
2015-05-13 6:20 ` Eric Dumazet
2015-05-13 7:25 ` Ying Xue
2015-05-13 10:32 ` Ying Xue [this message]
2015-05-13 13:07 ` Eric Dumazet
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=55532845.8010709@windriver.com \
--to=ying.xue@windriver.com \
--cc=davem@davemloft.net \
--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).