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.ke...@gmail.com>
> > -----
> > 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 )

Reply via email to