From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 F2F3A7D3FE; Mon, 8 Apr 2024 14:00:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712584839; cv=none; b=VOyAgHoQ2G4N61aSmAkSgg2GJez5Fx6uomtzGgfPiCCI6WvJB1BSsJyDr9opwhr2NtqvN6GdOoBj5Osij+HplTxhA8HkwUg00vKsIE5P8zD5MqW/DbF4hJ1BOGT8ilW5GHJAeXakr1r8/HcdHbCXzeLjBq3jU1KqIjJ0J6XmxSk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712584839; c=relaxed/simple; bh=ck9yslNbH32fFjOuFv9blUBipVQ8O1WmxQW3SD+D7Tg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=uLBrTS9umX4QSPxRKHKMLESwbc7qKMvx133cZcCh5lB96nY/cMty6MuGFwgtYAt3T5q3XCONd0y9lRjaRuOHqi3BIxibseTLs4BOT3plGYuMZ2hkiggTkLV00B6bbncr3dN5aZA5Rxgzo9EraYJFGY2kod0fosKQlbkFpf01SWQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=FvcQV9Nc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="FvcQV9Nc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 785FFC433C7; Mon, 8 Apr 2024 14:00:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712584838; bh=ck9yslNbH32fFjOuFv9blUBipVQ8O1WmxQW3SD+D7Tg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FvcQV9Ncxbdvksfy+eX24qbVH/aFn3/FRhd6a62aRLyVSY/LfhJ0dSCTFLJT7cHTe T40fGFXRdiMvKFeFG6Hba4I8t1hQQy0rn0Bn3CSmxhkhEN0X10+57mz4zh2FdclTIj 1JghQkDnm959V+lB3vA3g8e5ks/uIuf+mPpzD2PQ= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Mikko Rapeli , Avri Altman , Adrian Hunter , Francesco Dolcini , Ulf Hansson Subject: [PATCH 5.15 574/690] mmc: core: Initialize mmc_blk_ioc_data Date: Mon, 8 Apr 2024 14:57:20 +0200 Message-ID: <20240408125420.401737858@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240408125359.506372836@linuxfoundation.org> References: <20240408125359.506372836@linuxfoundation.org> User-Agent: quilt/0.67 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.15-stable review patch. If anyone has any objections, please let me know. ------------------ From: Mikko Rapeli commit 0cdfe5b0bf295c0dee97436a8ed13336933a0211 upstream. Commit 4d0c8d0aef63 ("mmc: core: Use mrq.sbc in close-ended ffu") adds flags uint to struct mmc_blk_ioc_data, but it does not get initialized for RPMB ioctls which now fails. Let's fix this by always initializing the struct and flags to zero. Fixes: 4d0c8d0aef63 ("mmc: core: Use mrq.sbc in close-ended ffu") Closes: https://bugzilla.kernel.org/show_bug.cgi?id=218587 Link: https://lore.kernel.org/all/20231129092535.3278-1-avri.altman@wdc.com/ Cc: stable@vger.kernel.org Signed-off-by: Mikko Rapeli Reviewed-by: Avri Altman Acked-by: Adrian Hunter Tested-by: Francesco Dolcini Link: https://lore.kernel.org/r/20240313133744.2405325-1-mikko.rapeli@linaro.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/core/block.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/mmc/core/block.c +++ b/drivers/mmc/core/block.c @@ -412,7 +412,7 @@ static struct mmc_blk_ioc_data *mmc_blk_ struct mmc_blk_ioc_data *idata; int err; - idata = kmalloc(sizeof(*idata), GFP_KERNEL); + idata = kzalloc(sizeof(*idata), GFP_KERNEL); if (!idata) { err = -ENOMEM; goto out;