public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Ding Tianhong <dingtianhong@huawei•com>
To: Gao feng <gaofeng@cn•fujitsu.com>, Eric Dumazet <eric.dumazet@gmail•com>
Cc: David Miller <davem@davemloft•net>, <yoshfuji@linux-ipv6•org>,
	<joe@perches•com>, <vfalico@redhat•com>, <netdev@vger•kernel.org>
Subject: Re: [PATCH net] net: neighbour: add neighbour dead check for neigh_timer_handler()
Date: Thu, 5 Dec 2013 11:17:58 +0800	[thread overview]
Message-ID: <529FF066.1070307@huawei.com> (raw)
In-Reply-To: <529FC980.8020101@cn.fujitsu.com>

On 2013/12/5 8:32, Gao feng wrote:
> On 12/04/2013 11:24 PM, Eric Dumazet wrote:
>> On Wed, 2013-12-04 at 17:16 +0800, Ding Tianhong wrote:
>>>>> 						base->running_timer = neigh->timer;
>>>>> 						neigh_timer_handler() => at this time, refcnt is 2;
>>>>>
>>>>> user->	neigh_changeaddr()
>>>>> 	neigh_flush_dev();
>>>>> 	neigh_del_imer, refcnt dec to 1;
>>>>
>>>> Nope : del_timer() would return 0 here, so we do not decrement refcnt.
>>>>
>>>
>>> The first call for del_timer() will return 1, because the timer->entry.next is not NULL,
>>> then in the neigh_destroy, the del_timer() again will return 0 because timer->entry.next is NULL. 
>>
>> Again no. You are very mistaken.
>>
>> del_timer() return code is not a hint. Its a precise meaning.
>>
>> It cannot return 1 if the timer function is running or is about to run.
>>
>> If you believe there is  bug in del_timer(), fix it ;)
>>
>>
> 
> Yes, you are right, __run_timers did this job.
> So We still don't know what's the root reason.
> 
Yes, I miss it, the running timer is detached from the list, thanks for all above.

Regards
Ding

> 

  reply	other threads:[~2013-12-05  3:18 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-03 13:48 [PATCH net] net: neighbour: add neighbour dead check for neigh_timer_handler() Ding Tianhong
2013-12-03 15:03 ` Hannes Frederic Sowa
2013-12-04  1:36   ` Ding Tianhong
2013-12-03 16:28 ` Eric Dumazet
2013-12-04  1:59   ` Ding Tianhong
2013-12-03 16:37 ` David Miller
2013-12-04  2:37 ` Gao feng
2013-12-04  4:04   ` Ding Tianhong
2013-12-04  4:21     ` David Miller
2013-12-04  6:19       ` Ding Tianhong
2013-12-04  6:27         ` Eric Dumazet
2013-12-04  9:16           ` Ding Tianhong
2013-12-04 10:10             ` Gao feng
2013-12-04 15:24             ` Eric Dumazet
2013-12-05  0:32               ` Gao feng
2013-12-05  3:17                 ` Ding Tianhong [this message]
2013-12-18  6:37                   ` Ding Tianhong
2013-12-18  7:51                     ` Hannes Frederic Sowa
2013-12-18  8:19                       ` Ding Tianhong
2013-12-18  8:41                         ` Hannes Frederic Sowa
2013-12-18  8:57                           ` Ding Tianhong
2013-12-18  9:28                             ` Hannes Frederic Sowa
2013-12-18 10:02                               ` Ding Tianhong
2013-12-18 10:21                                 ` Hannes Frederic Sowa
2013-12-18 11:57                                   ` Ding Tianhong
2013-12-18 14:27                                     ` Hannes Frederic Sowa
2013-12-18 15:12                                       ` Ding Tianhong
2013-12-18 15:46                                         ` Hannes Frederic Sowa
2013-12-19  3:32                                           ` Ding Tianhong
2013-12-04  6:36         ` 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=529FF066.1070307@huawei.com \
    --to=dingtianhong@huawei$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=eric.dumazet@gmail$(echo .)com \
    --cc=gaofeng@cn$(echo .)fujitsu.com \
    --cc=joe@perches$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=vfalico@redhat$(echo .)com \
    --cc=yoshfuji@linux-ipv6$(echo .)org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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