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:	Tue, 11 Nov 2008 09:34:21 +0800
From:	Jianjun Kong <jianjun@...ux.org>
To:	David Miller <davem@...emloft.net>
Cc:	netdev@...r.kernel.org
Subject: Re: [PATCH] nets: fix problem of using lock

On Mon, Nov 10, 2008 at 01:35:15PM -0800, David Miller wrote:
>From: Jianjun Kong <jianjun@...ux.org>
>Date: Thu, 6 Nov 2008 18:41:03 +0800
>
>> net/core/skbuff.c: void skb_queue_purge(struct sk_buff_head *list)
>> 
>> This function should takes the the list lock, because the operation to
>> this list shoule be atomic. And __skb_queue_purge()  (in
>> include/linux/skbuff.c) real delete the buffers in the list.
>> 
>> Signed-off-by: Jianjun Kong <jianjun@...ux.org>
>
>No, this function is fine.  skb_dequeue() takes the lock so
>there cannot be any list corruption.
>
>And this function is called in contexts where the caller knows
>that no new packets can be added to the list (closing a socket,
>shutting down a device, etc.)  And even if new packets could
>appear, taking the lock over the entire function would not
>help that problem.
>
>In fact, I suspect that many if not all skb_queue_purge() callers
>can be converted to use __skb_queue_purge().

Thanks, I've known :-)

-- 
Jianjun Kong @_@ Happy Hacking
Homepage: http://kongove.cn/
Gtalk: kongjianjun@...il.com
--
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