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]
Date:	Sun, 7 Jul 2013 15:08:10 +0300
From:	Jack Morgenstein <jackm@....mellanox.co.il>
To:	Roland Dreier <roland@...nel.org>
Cc:	Or Gerlitz <ogerlitz@...lanox.com>,
	Or Gerlitz <or.gerlitz@...il.com>,
	Eli Cohen <eli@....mellanox.co.il>,
	"linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
	Eli Cohen <eli@...lanox.com>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH for-next 0/8] Add Mellanox mlx5 driver for Connect-IB devices

On Wednesday 03 July 2013 22:26, Roland Dreier wrote:
> Look at the actual timer code.  del_timer_sync() won't work if
> something unrelated re-adds the timer, but it will work if the timer
> itself is what re-adds itself.
> 
> Documentation/DocBook/kernel-locking.tmpl says:
> 
>       Another common problem is deleting timers which restart
>       themselves (by calling <function>add_timer()</function> at the end
>       of their timer function).  Because this is a fairly common case
>       which is prone to races, you should use
> <function>del_timer_sync()</function>
>       (<filename class="headerfile">include/linux/timer.h</filename>)
>       to handle this case.  It returns the number of times the timer
>       had to be deleted before we finally stopped it from adding itself back
>       in.
> 
> which pretty clearly says that del_timer_sync() will work in this case.
> 
> Or look at the code using it in arch/sparc/kernel/led.c for example
> (just one of the first hits in my grep, there are many other
> examples).
> 
> Not a big deal but I'm pretty sure the flag isn't needed.

Thanks for the feedback, Roland!

You are correct, and I removed the "active" flag in V3 of the patch set (to be submitted shortly).

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