lkml.org 
[lkml]   [2013]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 1/3] blk-mq: Sanity check reserved tags
Signed-off-by: Alexander Gordeev <agordeev@redhat.com>
---
block/blk-mq-tag.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/block/blk-mq-tag.c b/block/blk-mq-tag.c
index dcbc2a4..6718007 100644
--- a/block/blk-mq-tag.c
+++ b/block/blk-mq-tag.c
@@ -335,6 +335,8 @@ static void __blk_mq_put_reserved_tag(struct blk_mq_tags *tags,
{
unsigned long flags;

+ BUG_ON(tag >= tags->reserved_tags);
+
spin_lock_irqsave(&tags->lock, flags);
tags->reservelist[tags->nr_reserved] = tag;
tags->nr_reserved++;
--
1.7.7.6

--
Regards,
Alexander Gordeev
agordeev@redhat.com


\
 
 \ /
  Last update: 2013-08-02 16:21    [W:0.080 / U:0.192 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site