All of lore.kernel.org
 help / color / mirror / Atom feed
* [BUG] scsi/fcoe: Sleep-in-atomic bugs in fcoe driver
@ 2017-10-03  3:02 Jia-Ju Bai
  2017-10-04 10:06 ` Johannes Thumshirn
  0 siblings, 1 reply; 2+ messages in thread
From: Jia-Ju Bai @ 2017-10-03  3:02 UTC (permalink / raw)
  To: jth, jejb, martin.petersen; +Cc: fcoe-devel, linux-scsi, linux-kernel

According to fcoe_ctlr.c, the driver may sleep under a RCU lock,
and the function call paths are:
fcoe_ctlr_disc_stop_locked (acquire the RCU lock)
   fc_rport_logoff
     mutex_lock --> may sleep

fcoe_ctlr_vn_disc
   fc_rport_login
     mutex_lock --> may sleep

fcoe_ctlr_vn_age
   fc_rport_logoff
     mutex_lock --> may sleep

These bugs are found by my static analysis tool and my code review.

Thanks,
Jia-Ju Bai

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [BUG] scsi/fcoe: Sleep-in-atomic bugs in fcoe driver
  2017-10-03  3:02 [BUG] scsi/fcoe: Sleep-in-atomic bugs in fcoe driver Jia-Ju Bai
@ 2017-10-04 10:06 ` Johannes Thumshirn
  0 siblings, 0 replies; 2+ messages in thread
From: Johannes Thumshirn @ 2017-10-04 10:06 UTC (permalink / raw)
  To: Jia-Ju Bai
  Cc: jth, jejb, martin.petersen, fcoe-devel, linux-scsi, linux-kernel

On Tue, Oct 03, 2017 at 11:02:33AM +0800, Jia-Ju Bai wrote:
> According to fcoe_ctlr.c, the driver may sleep under a RCU lock,
> and the function call paths are:
> fcoe_ctlr_disc_stop_locked (acquire the RCU lock)
>   fc_rport_logoff
>     mutex_lock --> may sleep
> 
> fcoe_ctlr_vn_disc
>   fc_rport_login
>     mutex_lock --> may sleep
> 
> fcoe_ctlr_vn_age
>   fc_rport_logoff
>     mutex_lock --> may sleep
> 
> These bugs are found by my static analysis tool and my code review.
> 
> Thanks,
> Jia-Ju Bai
> 

Thanks for the report, coincidentally I have a bug report for this as well (in
a real setup not just static analysis) and gave the reporter a patch to test.
Once it's verified I'll post it here.

Thanks,
	Johannes

-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-10-04 10:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-03  3:02 [BUG] scsi/fcoe: Sleep-in-atomic bugs in fcoe driver Jia-Ju Bai
2017-10-04 10:06 ` Johannes Thumshirn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.