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 1C99B147C77; Thu, 11 Apr 2024 10:38:03 +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=1712831883; cv=none; b=AhbhwfOh41CgBrm4ZOnJz3jk6pN7eAtV64EWn5cUFvaL8ZtjdmO1loGQwlmXlk1BeMj6ODZ+VmA1i+PfQAYnhtzvu9ZtEta9lWgF0N1vKVQ7nlqq9aKpkA1R28NlIBSUssfV1LmlTn9yJ8jEMkNXfM6W13rH/k6gxytW3nFX5M8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712831883; c=relaxed/simple; bh=TWTdz9UB2bmVNHFUURcfYV900+M5bp+fwPzhUOD8NO0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=LP2VC9c//8GtwkUt4UXRINGKQJ9oTpXOydW6k0U2hKakRFsUfAroTQSH2X3IuK/IqEtTOX1/nF8DCnlpQP349BeM4BuiP1TkLJBTbOO2Gbm9Qyo9YokhIUiJRUxQU/pP7sEp675AV4IuAOwp0/zw4WpwRChz9Z4KYF37s+UBPus= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=lodfxJT5; 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="lodfxJT5" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 95C21C433F1; Thu, 11 Apr 2024 10:38:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1712831883; bh=TWTdz9UB2bmVNHFUURcfYV900+M5bp+fwPzhUOD8NO0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lodfxJT5WeEH6+GA1V1yIEyT7l3aS9tIpsFVzgGgpj59CjmcXX9+TAZQQ/GXBX/fS Mzvkoz65eBYH0dusXf76EaJZMU92bZWiebkhUxy1zJVkknlyBhJlWDA6KShuoOsJ1C yKriFxdfwJ9dplqEGDYOltBKf7grCvL11NuVlIuc= 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.10 159/294] mmc: core: Initialize mmc_blk_ioc_data Date: Thu, 11 Apr 2024 11:55:22 +0200 Message-ID: <20240411095440.432793746@linuxfoundation.org> X-Mailer: git-send-email 2.44.0 In-Reply-To: <20240411095435.633465671@linuxfoundation.org> References: <20240411095435.633465671@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.10-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 @@ -359,7 +359,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;