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] [day] [month] [year] [list]
Message-ID: <AANLkTikBpghBJ7P4Lg080a7lM4eE2jRy4OvtzmjRgODO@mail.gmail.com>
Date:	Thu, 10 Jun 2010 17:44:02 +0800
From:	Sonic Zhang <sonic.adi@...il.com>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org, uclinux-dist-devel@...ckfin.uclinux.org
Subject: Re: [PATCH v3] netdev:bfin_mac: reclaim and free tx skb as soon as 
	possible after transfer

On Tue, Jun 8, 2010 at 12:22 PM, David Miller <davem@...emloft.net> wrote:
> From: sonic zhang <sonic.adi@...il.com>
> Date: Mon, 7 Jun 2010 18:38:24 +0800
>
>>
>> +     if (timer_pending(&lp->tx_reclaim_timer))
>> +             del_timer(&(lp->tx_reclaim_timer));
>> +
>
> Please remove the excess parenthesis around lp->tx_reclaim_timer being
> passed to del_timer().
>
> Also, you can unconditionally call del_timer().  If the timer isn't running
> the call won't do anything.

OK

>
> But you have to do something to make sure you don't race with the code that
> enables the timer, f.e. what keeps the timer from being scheduled right
> after you make this del_timer() call?
>
Sorry, I don't understand. If the timer is removed from the timer base
list,  how can it be scheduled? Timeout callbacks are scheduled only
in __run_timers() in soft irq handler.  Timer base list is protected
by a spinlock. After a timer is removed from the list, __run_timers()
won't triggers it any more.

Does I miss something here?

Thanks

Sonic
--
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