Skip to contentSkip to conversation

include/linux/spinlock.h:384:9: sparse: sparse: context imbalance in 'flush_end_io' - unexpected unlock

PATCH Greg Kroah-Hartman 2 participants 2 messages Oct 4, 2019 – Oct 9, 2019 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 28 lines · Jens Axboe
Quoted 18 lines · kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head:   45830aebf3fc94937285ed325fdb97043f6b6108
commit: 9afbbbbab3cd79e3aa14edd4c6269e89eab79343 [7762/7788] block: fix null pointer dereference in blk_mq_rq_timed_out()
reproduce:
         # apt-get install sparse
         # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
         git checkout 9afbbbbab3cd79e3aa14edd4c6269e89eab79343
         make ARCH=x86_64 allmodconfig
         make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag

sparse warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

include/linux/spinlock.h:384:9: sparse: sparse: context imbalance in 'flush_end_io' - unexpected unlock

Quoted 8 lines

vim +/flush_end_io +384 include/linux/spinlock.h

c2f21ce2e31286 Thomas Gleixner 2009-12-02  381
3490565b633c70 Denys Vlasenko  2015-07-13  382  static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
c2f21ce2e31286 Thomas Gleixner 2009-12-02  383  {

c2f21ce2e31286 Thomas Gleixner 2009-12-02 @384 raw_spin_unlock_irqrestore(&lock->rlock, flags);
c2f21ce2e31286 Thomas Gleixner 2009-12-02 385 }
c2f21ce2e31286 Thomas Gleixner 2009-12-02 386

Quoted 2 lines

This report looks bogus - both for mainline, and I checked that the 4.19 backport is correct too.

Thanks for testing and verifying that this is sane.

greg k-h

#2 lore raw
In reply to a message not in the archive
Quoted 20 lines · Jens Axboe
Quoted 19 lines · kbuild test robot
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head:   45830aebf3fc94937285ed325fdb97043f6b6108
commit: 9afbbbbab3cd79e3aa14edd4c6269e89eab79343 [7762/7788] block: fix null pointer dereference in blk_mq_rq_timed_out()
reproduce:
          # apt-get install sparse
          # sparse version: v0.6.1-rc1-7-g2b96cd8-dirty
          git checkout 9afbbbbab3cd79e3aa14edd4c6269e89eab79343
          make ARCH=x86_64 allmodconfig
          make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag

sparse warnings: (new ones prefixed by >>)

Quoted 1 line
Quoted 1 line

include/linux/spinlock.h:384:9: sparse: sparse: context imbalance in 'flush_end_io' - unexpected unlock

vim +/flush_end_io +384 include/linux/spinlock.h

Quoted 9 lines
Quoted 6 lines
c2f21ce2e31286 Thomas Gleixner 2009-12-02  381
3490565b633c70 Denys Vlasenko  2015-07-13  382  static __always_inline void spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
c2f21ce2e31286 Thomas Gleixner 2009-12-02  383  {

c2f21ce2e31286 Thomas Gleixner 2009-12-02 @384 raw_spin_unlock_irqrestore(&lock->rlock, flags);
c2f21ce2e31286 Thomas Gleixner 2009-12-02 385 }
c2f21ce2e31286 Thomas Gleixner 2009-12-02 386

This report looks bogus - both for mainline, and I checked that the 4.19 backport is correct too.

Sorry for the inconvenience. It's a false positive. we'll fix it asap.

Best Regards,
Rong Chen