From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751331AbcBKP4h (ORCPT ); Thu, 11 Feb 2016 10:56:37 -0500 Received: from mail-ob0-f176.google.com ([209.85.214.176]:35041 "EHLO mail-ob0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751140AbcBKP4f (ORCPT ); Thu, 11 Feb 2016 10:56:35 -0500 Subject: Re: [PATCH] null_blk: oops when initializing without lightnvm To: =?UTF-8?Q?Matias_Bj=c3=b8rling?= , linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com References: <1455198553-24359-1-git-send-email-m@bjorling.me> From: Jens Axboe Message-ID: <56BCAF2C.6030809@kernel.dk> Date: Thu, 11 Feb 2016 08:56:28 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <1455198553-24359-1-git-send-email-m@bjorling.me> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/11/2016 06:49 AM, Matias Bjørling wrote: > If the LightNVM subsystem is not compiled into the kernel, and the > null_blk device driver requests lightnvm to be initialized. The call to > nvm_register fails and the null_add_dev function cleans up the > initialization. However, at this point the null block device has > already been added to the nullb_list and thus a second cleanup will > occur when the function has returned, that leads to a double call to > blk_cleanup_queue. Deferring the add seems fine, applied for 4.5. -- Jens Axboe