Signed-off-by: Alexander Gordeev <[email protected]>
---
 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
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to