Re: [Patch v2] wd719x: pass GFP_ATOMIC instead of GFP_KERNEL linux-kernel@xxxxxxxxxxxxxxx

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 29, 2019 at 02:13:18PM -0700, David Rientjes wrote:
> On Wed, 29 May 2019, Hariprasad Kelam wrote:
> 
> > dont acquire lock before calling wd719x_chip_init.
> > 
> > Issue identified by coccicheck
> > 
> > Signed-off-by: Hariprasad Kelam <hariprasad.kelam@xxxxxxxxx>
> > -----
> > changes in v1: Replace GFP_KERNEL with GFP_ATOMIC.
> > changes in v2: Call wd719x_chip_init  without lock as suggested
> > 		in review
> 
> Why was host_lock taken here initially?  I assume it's to protect some 
> race in init that leads to an undefined state.

wd719x_chip_init is getting called from wd719x_host_reset
and wd719x_board_found.

In wd719x_board_found case its not acquiring any lock.
In wd719x_host_reset it is called under spin_lock.

Acquiring spin_lock in wd719x_host_reset is there from initial commit
so its better we wont remove this lock.

I think we Patch v1 is  correct fix(pass GFP_ATOMIC instead of GPF_KERNEL )




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux