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]
Message-ID: <73da2ef8-2454-5614-d637-0ce7c5287433@redhat.com>
Date:   Wed, 4 Jan 2017 11:03:32 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     Stefan Hajnoczi <stefanha@...il.com>
Cc:     mst@...hat.com, kvm@...r.kernel.org,
        virtualization@...ts.linux-foundation.org, netdev@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH net-next V2 3/3] tun: rx batching



On 2017年01月03日 21:33, Stefan Hajnoczi wrote:
> On Wed, Dec 28, 2016 at 04:09:31PM +0800, Jason Wang wrote:
>> +static int tun_rx_batched(struct tun_file *tfile, struct sk_buff *skb,
>> +			  int more)
>> +{
>> +	struct sk_buff_head *queue = &tfile->sk.sk_write_queue;
>> +	struct sk_buff_head process_queue;
>> +	int qlen;
>> +	bool rcv = false;
>> +
>> +	spin_lock(&queue->lock);
> Should this be spin_lock_bh()?  Below and in tun_get_user() there are
> explicit local_bh_disable() calls so I guess BHs can interrupt us here
> and this would deadlock.

sk_write_queue were accessed only in this function which runs under 
process context, so no need for spin_lock_bh() here.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ