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 8469435836D for ; Tue, 17 Mar 2026 09:15:18 +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=1773738918; cv=none; b=IY1GN5s8+xjhvoct+gUFvu0Rp5E/WSmhIeCBNDwcknlnSSv6tLNZ9U8qu1Zj0zhZE0Q0Pi/Vq9VY0MrR8ljrVZ/EN4HXi0GVFgoiMZMvPZ14zr9UNQlug0j7TFxY75cQCHuhyIEmk7vgTLKtMcds+rQwGcM/6I5+1YCxgQhrTZo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773738918; c=relaxed/simple; bh=XZ548VW34a4HHSiVJKV7MlTit9tTCvQeRtHLC+Hg500=; h=Subject:To:Cc:From:Date:Message-ID:MIME-Version:Content-Type; b=bJ/lpvmhSzkeopvNuEc4ILU/iWkgdUWne/KW/rFpdcVieE4U9NPlGj0RX5luWXtihEUhS1CyNS1D1TLU31s0Wq5tbuj7tRKoXoIV3WauXp994HvIBcxDOdywSQ9GjCZSkHeDnVHx7BE1TvwNVIWtqdh35C2JWSprGbEVy6rT91U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=erFYCNgh; 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="erFYCNgh" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90A8EC2BCB0; Tue, 17 Mar 2026 09:15:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1773738918; bh=XZ548VW34a4HHSiVJKV7MlTit9tTCvQeRtHLC+Hg500=; h=Subject:To:Cc:From:Date:From; b=erFYCNghmgWWeoxgbFnlbsmUwnhX4cKeBb/LdMj3yHcDHHY5UWGqCAn2KVs/TKzL+ nrUFAfrg27ozX586jNLtT41uOC24jB2C8BQzhvKJyxVQ0ieKtT3rvnxolYGljuDrvq atjc+jDzi6RojJvaFPVEX7lcPo/kuTc/DIpfrrtQ= Subject: FAILED: patch "[PATCH] mmc: core: Avoid bitfield RMW for claim/retune flags" failed to apply to 5.10-stable tree To: pgeng@nvidia.com,adrian.hunter@intel.com,ulf.hansson@linaro.org Cc: From: Date: Tue, 17 Mar 2026 10:15:14 +0100 Message-ID: <2026031713-defeat-mobster-d0a8@gregkh> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit The patch below does not apply to the 5.10-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . To reproduce the conflict and resubmit, you may use the following commands: git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-5.10.y git checkout FETCH_HEAD git cherry-pick -x 901084c51a0a8fb42a3f37d2e9c62083c495f824 # git commit -s git send-email --to '' --in-reply-to '2026031713-defeat-mobster-d0a8@gregkh' --subject-prefix 'PATCH 5.10.y' HEAD^.. Possible dependencies: thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 901084c51a0a8fb42a3f37d2e9c62083c495f824 Mon Sep 17 00:00:00 2001 From: Penghe Geng Date: Thu, 19 Feb 2026 15:29:54 -0500 Subject: [PATCH] mmc: core: Avoid bitfield RMW for claim/retune flags Move claimed and retune control flags out of the bitfield word to avoid unrelated RMW side effects in asynchronous contexts. The host->claimed bit shared a word with retune flags. Writes to claimed in __mmc_claim_host() or retune_now in mmc_mq_queue_rq() can overwrite other bits when concurrent updates happen in other contexts, triggering spurious WARN_ON(!host->claimed). Convert claimed, can_retune, retune_now and retune_paused to bool to remove shared-word coupling. Fixes: 6c0cedd1ef952 ("mmc: core: Introduce host claiming by context") Fixes: 1e8e55b67030c ("mmc: block: Add CQE support") Cc: stable@vger.kernel.org Suggested-by: Adrian Hunter Signed-off-by: Penghe Geng Acked-by: Adrian Hunter Signed-off-by: Ulf Hansson diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index e0e2c265e5d1..ba84f02c2a10 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h @@ -486,14 +486,12 @@ struct mmc_host { struct mmc_ios ios; /* current io bus settings */ + bool claimed; /* host exclusively claimed */ + /* group bitfields together to minimize padding */ unsigned int use_spi_crc:1; - unsigned int claimed:1; /* host exclusively claimed */ unsigned int doing_init_tune:1; /* initial tuning in progress */ - unsigned int can_retune:1; /* re-tuning can be used */ unsigned int doing_retune:1; /* re-tuning in progress */ - unsigned int retune_now:1; /* do re-tuning at next req */ - unsigned int retune_paused:1; /* re-tuning is temporarily disabled */ unsigned int retune_crc_disable:1; /* don't trigger retune upon crc */ unsigned int can_dma_map_merge:1; /* merging can be used */ unsigned int vqmmc_enabled:1; /* vqmmc regulator is enabled */ @@ -508,6 +506,9 @@ struct mmc_host { int rescan_disable; /* disable card detection */ int rescan_entered; /* used with nonremovable devices */ + bool can_retune; /* re-tuning can be used */ + bool retune_now; /* do re-tuning at next req */ + bool retune_paused; /* re-tuning is temporarily disabled */ int need_retune; /* re-tuning is needed */ int hold_retune; /* hold off re-tuning */ unsigned int retune_period; /* re-tuning period in secs */