lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160526070934.GB22449@lst.de>
Date:	Thu, 26 May 2016 09:09:34 +0200
From:	Christoph Hellwig <hch@....de>
To:	Ming Lin <mlin@...nel.org>
Cc:	linux-kernel@...r.kernel.org, linux-block@...r.kernel.org,
	Jens Axboe <axboe@...com>, Christoph Hellwig <hch@....de>
Subject: Re: [PATCH] blk-mq: clear q->mq_ops if init fail

On Wed, May 25, 2016 at 11:23:27PM -0700, Ming Lin wrote:
> From: Ming Lin <ming.l@...sung.com>
> 
> blk_mq_init_queue() calls blk_mq_init_allocated_queue(), but q->mq_ops
> was not cleared when blk_mq_init_allocated_queue() fails.
> Then blk_cleanup_queue() calls blk_mq_free_queue() which will crash because:
> - q->all_q_node is not added to all_q_list yet
> - q->tag_set is NULL
> - hctx was not setup yet or already freed
> 
> Fixed it by clearing q->mq_ops on error path.

Looks fine,

Reviewed-by: Christoph Hellwig <hch@....de>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ