Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp382368pxj; Thu, 3 Jun 2021 08:58:28 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz8wkQVjF6yN6DD6+UNuhN+bDZ6W8ROXZmpeV1Ti0Gkj90ad2JugHMWati3KAA0AKX9YB2K X-Received: by 2002:a17:906:161b:: with SMTP id m27mr62067ejd.89.1622735908375; Thu, 03 Jun 2021 08:58:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1622735908; cv=none; d=google.com; s=arc-20160816; b=RmrnSCKPTJVZ7hWTOtc2lvK3WBQ15kFQ9DELUYg6JkaS9fMugn9wvrOzKh/MQthdRM 0HlFiic1ixbtMqw9v/V0FIZYN8AzVGYabEkldLPWFrzZXXHQ62VcqhoTXx3MizI3/RjP sB19omYNq4owl59fqUds3nHmsNw8Vi/Wa19nwckURzqrgTQ021r5kvDqd0XJtymCbprr cfYpiKywG9htAnMBROP/FOoNDfeprOyEpsvH5T8mYLbVjNmelUD7OtZd3RRvtUov7JHK 9OqeiDhIm4hfFIn1wPPLzHagLdaJHxQRcjlFGIJ6qGIcCYqEZSTbxHjZeMKcO5sB8Vy6 73qA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:from:references :cc:to:subject:dkim-signature; bh=OQ8/izGugLT2mg1DaIwELKOTXax/WeIQBPj5/sAmtrM=; b=yXjiyQOYLdYWHlgmWcdH0l1qoKpKcwAG2Eyj7QReQUyPkx13O68zycvGYlHL+dyV4s d7HjHQbPAczovKdCT0grTEKwkfLKj8daqbzkufVx+xw1Mk2GCTdfLCnhXYwseCXCm95K 6IEUPZYaojg7rvJQIfdE0s+Lk/46RZjv5mK/1UkKADyX8eIqTmWLjuiZZ5Ne1NnkINz0 r/L/kAwMHtH+51NMb25gHpmVr+eGAFPU/4er5GjT9tsA3MOCiQx8x+vhhX0z+R5Nv6pj OHfEM8tidZDuSv/CZ94NENFffNnvXleGYCYBjjmbiYYv/CC8toDAT3w6Q+jZIHa9YbGd pynw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=sWRObvHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id dy11si2624679edb.579.2021.06.03.08.58.05; Thu, 03 Jun 2021 08:58:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel-dk.20150623.gappssmtp.com header.s=20150623 header.b=sWRObvHA; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229953AbhFCP4t (ORCPT + 99 others); Thu, 3 Jun 2021 11:56:49 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34358 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229956AbhFCP4r (ORCPT ); Thu, 3 Jun 2021 11:56:47 -0400 Received: from mail-io1-xd35.google.com (mail-io1-xd35.google.com [IPv6:2607:f8b0:4864:20::d35]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 895D2C06175F for ; Thu, 3 Jun 2021 08:54:47 -0700 (PDT) Received: by mail-io1-xd35.google.com with SMTP id d9so6844768ioo.2 for ; Thu, 03 Jun 2021 08:54:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel-dk.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=OQ8/izGugLT2mg1DaIwELKOTXax/WeIQBPj5/sAmtrM=; b=sWRObvHAN4uM8PnmujHncknfBPxl21ZOniXu3Dux67+WGcu23NMh3W6RrJOkoxB8QA 2OU+0KkLfMZIVPk1kNPOPv7swr00MTbUX6ZKkP/YEFnc/WK+mf58qnArZuxOspM88n0y LpTS5ZXOO2bJ7nVweslbdch4xpF6+GL+r+TVUGMoXsRIw7N1rJM0wvnJabdSSjXtkRnc g4LnDYFI35vBVCcwun/cXvfB+zOKM9jMUBIZnA2+uZFzKEZzUn2jJ/EdPb4vo6PjTHw9 N9HUkRZU6hA2vXjjzTFurjLEkd6gbsPzExUJazanOQoj3bVj3VlB/VnM3okLFx+MtMq1 /Lbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=OQ8/izGugLT2mg1DaIwELKOTXax/WeIQBPj5/sAmtrM=; b=aOs7bDArSrwXVg3AAOsAt0G8JLkV5S1GCn42FoIlHvhLa3HwLXlkvdSyK+xVzwpKs0 2rvXJfYmshcha0Yse0EK65xaHRHfw9tXjfl3SdRyVZAoIxdU5duPuS39EKRLRRytDA5O DMx/98HlGs0D4FkwOjqzfiA+vE91G+y5k2mYaTPtgr/QDi0d1wtwtYn9UzITTy/DLC9X VLmPt0rR4ZhCS6Pfd7bDYd0kZULFT5UpqV68FcSY36mO2IYJ19oBZ5mtVDARkNLU5g6u VN2XEgi7DUhP/jmLEWqlAVmCJuH2BDla+VxPKi8cHyF1Y61PWkX5uTV5m8yfgILGFKS3 VfIw== X-Gm-Message-State: AOAM531ZbljyahV9sjxoPImAf6kGr9yJOlkfFLrKxTSkUZ+sYlgEfdhe BYthl/uoVaCdHiK71h2gQxsfNrHmMqiuC4Q1 X-Received: by 2002:a6b:7b0a:: with SMTP id l10mr6024iop.120.1622735686716; Thu, 03 Jun 2021 08:54:46 -0700 (PDT) Received: from [192.168.1.30] ([65.144.74.34]) by smtp.gmail.com with ESMTPSA id x6sm2002769ilg.87.2021.06.03.08.54.45 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 03 Jun 2021 08:54:46 -0700 (PDT) Subject: Re: [PATCH][next] null_blk: Fix null pointer dereference on nullb->disk on blk_cleanup_disk call To: Colin King , Damien Le Moal , Christoph Hellwig , Ulf Hansson , linux-block@vger.kernel.org Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org References: <20210602100659.11058-1-colin.king@canonical.com> From: Jens Axboe Message-ID: Date: Thu, 3 Jun 2021 09:54:45 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210602100659.11058-1-colin.king@canonical.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6/2/21 4:06 AM, Colin King wrote: > From: Colin Ian King > > The error handling on a nullb->disk allocation currently jumps to > out_cleanup_disk that calls blk_cleanup_disk with a null pointer causing > a null pointer dereference issue. Fix this by jumping to out_cleanup_tags > instead. Applied, thanks. -- Jens Axboe