public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC] [PATCH] Potential bug fix for blk_tag_queue
@ 2008-08-26  1:03 Abhijeet Joglekar
  2008-08-26  1:03 ` [RFC][PATCH] blk-tag: Use atomic_t type for bqt->busy Abhijeet Joglekar
  2008-08-26  2:46 ` [RFC] [PATCH] Potential bug fix for blk_tag_queue Matthew Wilcox
  0 siblings, 2 replies; 6+ messages in thread
From: Abhijeet Joglekar @ 2008-08-26  1:03 UTC (permalink / raw)
  To: jens.axboe; +Cc: linux-scsi, ajoglekar

The following patch fixes a potential bug in the blk_tag_queue structure.
"busy" is used to keep track of outstanding tags, is declared as int,
and updated inside queue lock. For host-wide shared tag map, this corrupts
the value of busy, which hits BUG_ON during __blk_free_tags.

Recommend converting busy to atomic_t and using atomic_macros to access it.

---

Abhijeet Joglekar (1):
      blk-tag: Use atomic_t type for bqt->busy.


 block/blk-tag.c        |    8 ++++----
 include/linux/blkdev.h |    2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

-- 
Signature

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

end of thread, other threads:[~2008-08-26  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-08-26  1:03 [RFC] [PATCH] Potential bug fix for blk_tag_queue Abhijeet Joglekar
2008-08-26  1:03 ` [RFC][PATCH] blk-tag: Use atomic_t type for bqt->busy Abhijeet Joglekar
2008-08-26  2:46 ` [RFC] [PATCH] Potential bug fix for blk_tag_queue Matthew Wilcox
2008-08-26  7:00   ` Jens Axboe
2008-08-26  7:49     ` Abhijeet Joglekar
2008-08-26  8:58       ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox