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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Sat, 08 Mar 2014 19:10:32 -0500 (EST)
From:	David Miller <davem@...emloft.net>
To:	eric.dumazet@...il.com
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] pkt_sched: fq: do not hold qdisc lock while allocating
 memory

From: Eric Dumazet <eric.dumazet@...il.com>
Date: Fri, 07 Mar 2014 15:02:42 -0800

> On Fri, 2014-03-07 at 17:04 -0500, David Miller wrote:
> 
>> Eric I think you can simplify things a little further, and in fact I
>> think it makes these functions easier to understand.
>> 
>> The fq_resize() part should just grab the lock around the rehash and
>> the update of q->fq_root and q->fq_trees_log.
>> 
>> fq_change() should only grab the lock around the fq_dequeue() loop
>> and the call to qdisc_tree_descrease_qlen().  The rest of this
>> function is just validating netlink attributes and looking at state
>> that cannot change while we hold RTNL.
> 
> Hmm, but all these parameters we change in fq_change() are read by other
> cpus doing enqueue()/dequeue().
> 
> They are integers, so a race would be not a big deal I guess, but better
> add a fat comment then ;)

Good point, this patch as-is is fine, so applied.
--
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