From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 546453D649A for ; Fri, 3 Jul 2026 13:44:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783086259; cv=none; b=t0moCrBFol5qMVmc25ds7OfvFnks0PmW7XwfB2gwytZMELNQt7/BOW6H9l3PVuKNFybef7gqTtARrDlIS2IlNps3rUEpVHGAsO6Ta09uSLbyFZLsGUa2gFi6nsJnOb93177LamTW0HgKUrW+5iezmEDFqyqSI5/0Wl2x+oIVtsU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1783086259; c=relaxed/simple; bh=t3HuAeobGHLM3wZdimqEokrHYrDcqlIKhSLyz+NUd1s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=VcdU4tbJNeEAOok375eGpO5zZqou3SMGUVw0oPH8doScQ4iKR2sj0OwIa4iYO2P2mbq//SrpT20C+p3zlDFPWYvVynNFdDuRKfFaaxHte63zMqIit1hkQuZkXD/Wsn4KQQ5Z506QOtWsQbHS52sRdDk8Iyy1IcLYA/n8ksAE4hc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=NKIdPs8V; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="NKIdPs8V" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AC1F61F000E9; Fri, 3 Jul 2026 13:44:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1783086247; bh=8v9af2lDSb3ASd8ayFL4ngo6cw2ts8wfFrn9RS1/Vog=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=NKIdPs8VWLJaFwVofQ3L9FgfVwwU033hWwf4ACS6efVY4SkGZK8FmDslM9k9BduRe 0MzXCbe6Wk6u4Hw7sgMvaWwRbM69mVOxgJT994Jmqu3DCiLoqDDB67Kc5BqHjtJyBH PsJm3m6ADMGg3Qz1IhkUVFfjNKmKyYqxqOJkUP4QvKqcjM7pne5bBiqbpszllP1ySD MzjXc1N3a+7iuTVR3uaOnnXr3Q0sjw3XGXcHWiXd05o+vs+qj13HeuU5CztJVDyQvc l5cb7hFytKNaEAKA3QETH7nD11oIoi0DpHjUEL7kVB3zyO5mGJuUDfd3qVS0vC54Kr ufJ1DFRqcUV1Q== From: Pratyush Yadav To: Coiby Xu Cc: Pratyush Yadav , mdshahid03@gmail.com, Andrew Morton , Baoquan He , Mike Rapoport , Pasha Tatashin , Dave Young , kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Sourabh Jain Subject: Re: [PATCH] dm: crash dump: remove redundant NULL check before kvfree() In-Reply-To: (Coiby Xu's message of "Fri, 3 Jul 2026 21:28:25 +0800") References: <20260703112642.65498-1-mdshahid03@gmail.com> <2vxzbjcogu0b.fsf@kernel.org> Date: Fri, 03 Jul 2026 15:44:04 +0200 Message-ID: <2vxz7bncgpcr.fsf@kernel.org> User-Agent: Gnus/5.13 (Gnus v5.13) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Fri, Jul 03 2026, Coiby Xu wrote: > On Fri, Jul 03, 2026 at 02:03:32PM +0200, Pratyush Yadav wrote: >>On Fri, Jul 03 2026, mdshahid03@gmail.com wrote: >> >>> From: Mohammad Shahid >>> >>> kvfree() safely handles NULL pointers, so the explicit NULL check >>> before calling kvfree() is unnecessary. >>> >>> This issue was reported by ifnullfree.cocci. >>> >>> Signed-off-by: Mohammad Shahid >> >>Reviewed-by: Pratyush Yadav > > Hi Pratyush, > > Thanks for reviewing this patch! > >> >>BTW, Sashiko [0] pointed out a bunch of problems in the surrounding code, >>and they seem to look legit. If you're interested, help in fixing them >>would be much appreciated. >> >>[0] https://sashiko.dev/#/patchset/20260703112642.65498-1-mdshahid03@gmail.com > > I'll send a new version of > https://lore.kernel.org/kexec/20260501234342.2518281-1-coiby.xu@gmail.com/ > soon which can address Sashiko's feedback scrutinized by Sourabh. Oh, great. Thanks! -- Regards, Pratyush Yadav