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  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]
Date:	Sat, 31 May 2014 17:07:55 -0700
From:	Michael Chan <mchan@...adcom.com>
To:	Neil Horman <nhorman@...driver.com>
CC:	<davem@...emloft.net>, <netdev@...r.kernel.org>
Subject: Re: [PATCH 2/3] cnic: Don't take cnic_dev_lock in
 cnic_alloc_uio_rings()

On Sat, 2014-05-31 at 09:07 -0400, Neil Horman wrote: 
> On Fri, May 30, 2014 at 04:18:42PM -0700, Michael Chan wrote:
> > We are allocating memory with GFP_KERNEL under spinlock.  Since this is
> > the only call manipulating the cnic_udev_list and it is always under
> > rtnl_lock, cnic_dev_lock can be safely removed.
> > 
>  I don't think this is accurate.  cnic_alloc_uio_rings seems to protect the list
> with cnic_dev_lock, but has several paths (those calling ->alloc_resc()), that
> never hold the rtnl_lock.
> 
> 
->alloc_resc() is called by cnic_start_hw().  cnic_start_hw() is called
from 2 paths.  One is from netdev events which always hold rtnl_lock.
The other path is from bnx2/bnx2x with CNIC_CTL_START_CMD.  In bnx2,
this is called during bnx2_netif_start() which is always under
rtnl_lock.  In bnx2x, it is called during bnx2x_nic_load() which is also
under rtnl_lock().  Thanks.

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