lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 15 Dec 2010 14:52:29 +0100
From:	Tejun Heo <tj@...nel.org>
To:	Michael Chan <mchan@...adcom.com>,
	"David S. Miller" <davem@...emloft.net>,
	netdev <netdev@...r.kernel.org>
CC:	lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH net-next-2.6] bnx2: remove cancel_work_sync() from remove_one

On 12/14/2010 06:48 PM, Michael Chan wrote:
> 
> On Tue, 2010-12-14 at 08:09 -0800, Tejun Heo wrote:
>> Michael pointed out that bnx2_close() already cancels bp->reset_task
>> and thus it is guaranteed to be idle when bnx2_remove_one() is called.
>> Remove the unnecessary cancel_work_sync() in remove_one.
>>
>> Signed-off-by: Tejun Heo <tj@...nel.org>
>> Cc: Michael Chan <mchan@...adcom.com>
> 
> Acked-by: Michael Chan <mchan@...adcom.com>

After looking through the code, I don't think this is necessarily
correct.  ->ndo_close() doesn't guarantee that the watchdog timer has
finished running (the timer is deleted with del_timer() not
del_timer_sync()).  ie. the watchdog timer could still be running
after ->ndo_close() and may schedule reset_task.  If remove_one
doesn't flush the task, it may still be running when remove_one() is
called.

David, am I missing something?  Wouldn't it cleaner to guarantee that
->ndo_close() is called with the guarantee that the watchdog timer is
not running anymore?

-- 
tejun
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ