Re: [scsi:misc 301/301] drivers/scsi/fdomain.c:442:12: sparse: sparse: context imbalance in 'fdomain_host_reset' - wrong count at exit

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

 



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
jthumshirn@xxxxxxx                                +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



[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