Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753362Ab3HBODt (ORCPT ); Fri, 2 Aug 2013 10:03:49 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36291 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753293Ab3HBODr (ORCPT ); Fri, 2 Aug 2013 10:03:47 -0400 Date: Fri, 2 Aug 2013 16:05:25 +0200 From: Alexander Gordeev To: Jens Axboe Cc: linux-kernel@vger.kernel.org, Tejun Heo , "Nicholas A. Bellinger" , Mike Christie , Shaohua Li Subject: [PATCH 1/3] blk-mq: Sanity check reserved tags Message-ID: <772b43a459f07a8496f67e948e28cce88714e78a.1375451955.git.agordeev@redhat.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 845 Lines: 31 Signed-off-by: Alexander Gordeev --- 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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/