Re: [PATCH 2/3] cnic: Don't take cnic_dev_lock in cnic_alloc_uio_rings()
From: Michael Chan <mchan@broadcom.com>
Date: 2014-06-02 20:31:55
From: Michael Chan <mchan@broadcom.com>
Date: 2014-06-02 20:31:55
On Fri, 2014-05-30 at 15:33 -0700, Benjamin Poirier wrote:
On 2014/05/30 16:18, Michael Chan wrote:quoted
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.In that case, the many other instances of cnic_dev_lock throughout cnic should also be removed, no?
I don't think so. cnic_dev_list still needs to be protected using cnic_dev_lock. cnic_register_driver() for example is not called with rtnl_lock().