On Tue, Apr 30, 2019 at 04:02:15PM +0800, kbuild test robot wrote:
[...]
> >> drivers/scsi/fdomain.c:442:12: sparse: sparse: context imbalance in 
> >> 'fdomain_host_reset' - wrong count at exit
> 
> vim +/fdomain_host_reset +442 drivers/scsi/fdomain.c
> 
> 92408047 Ondrej Zary 2019-04-29  441  
> 92408047 Ondrej Zary 2019-04-29 @442  static int fdomain_host_reset(struct 
> scsi_cmnd *cmd)
> 92408047 Ondrej Zary 2019-04-29  443  {
> 92408047 Ondrej Zary 2019-04-29  444          struct Scsi_Host *sh = 
> cmd->device->host;
> 92408047 Ondrej Zary 2019-04-29  445          struct fdomain *fd = 
> shost_priv(sh);
> 92408047 Ondrej Zary 2019-04-29  446          unsigned long flags;
> 92408047 Ondrej Zary 2019-04-29  447  
> 92408047 Ondrej Zary 2019-04-29  448          
> spin_lock_irqsave(sh->host_lock, flags);
> 92408047 Ondrej Zary 2019-04-29  449          fdomain_reset(fd->base);
> 92408047 Ondrej Zary 2019-04-29  450          
> spin_lock_irqsave(sh->host_lock, flags);

That should be a spin_unlock_irqrestore() here  ~^
Otherwise this would end badly.

-- 
Johannes Thumshirn                            SUSE Labs Filesystems
jthumsh...@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Mary Higgins, Sri Rasiah
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850

Reply via email to