From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755034AbbCRXHR (ORCPT ); Wed, 18 Mar 2015 19:07:17 -0400 Received: from mail-pd0-f170.google.com ([209.85.192.170]:35948 "EHLO mail-pd0-f170.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751739AbbCRXHN (ORCPT ); Wed, 18 Mar 2015 19:07:13 -0400 Message-ID: <550A051F.3000106@kernel.dk> Date: Wed, 18 Mar 2015 17:07:11 -0600 From: Jens Axboe User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Sam Bradshaw CC: linux-kernel@vger.kernel.org Subject: Re: [PATCH v2] blkmq: Fix NULL pointer deref when all reserved tags in use References: <550A052F.6020601@micron.com> In-Reply-To: <550A052F.6020601@micron.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/18/2015 05:07 PM, Sam Bradshaw wrote: > When allocating from the reserved tags pool, bt_get() is called with > a NULL hctx. If all tags are in use, the hw queue is kicked to push > out any pending IO, potentially freeing tags, and tag allocation is > retried. The problem is that blk_mq_run_hw_queue() doesn't check for > a NULL hctx. So we avoid it with a simple NULL hctx test. > > This issue was introduced by: > b32232073e80: blk-mq: fix hang in bt_get() > > Tested by hammering mtip32xx with concurrent smartctl/hdparm. > > Signed-off-by: Sam Bradshaw > Signed-off-by: Selvan Mani Thanks Sam, added to the current series. -- Jens Axboe