From nobody Sun Nov 24 09:41:08 2024 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 0A2CE18FC7E; Wed, 6 Nov 2024 02:12:07 +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=1730859128; cv=none; b=EZnK4FbiTyYJvyYOhxGxYeYV5+a4QC/iEmAPFfgF1H8gqf2uGsByEuEZ41iAbRWZewkX6qIq3n70SDqaW0EKnJohFriIoEpbm2R0ukZI8U5ugoXKvwP98rvv4uIY02ry2s5oW2S2tuha43e3oLVoSc/tXGN62+cyCwvZvzHWriA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730859128; c=relaxed/simple; bh=KleIl4yJ8yfZ62BodLKA6r11H/0Q0ZkqPjQZhhON9TM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=OLx5QOOJdbqvY9riNwCtlflyc54UTRKcP+V+JMvh37gfnIM82QyP2LN81vC2u18TWQiNKI0js6BSKTuiHBhaAE40xkcJBMXQ5ZF7SWbN3CoEPd2nJKJYpwhEUY3egRqC4KWlBn6Nnu0nkLycfWIPy7qQ/ikhuqL3njRD3nxnWMY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=I2uOBv1M; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="I2uOBv1M" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 06605C4CECF; Wed, 6 Nov 2024 02:12:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1730859127; bh=KleIl4yJ8yfZ62BodLKA6r11H/0Q0ZkqPjQZhhON9TM=; h=From:To:Cc:Subject:Date:From; b=I2uOBv1M2+zRa4lLww8g5dX6//iA6Ox/VvB9lMCGt0XoAouKXDjMwAh1m4GngYEW+ T2/zkaKe+TWRUwaQ0mEB19SWmN8NRrClL4vBGwoeYMMnf40/z27mUBoiYLPvfh1M3j gBJ7LZxP31X5VvnEfZT8fYSEdY4+X92ThLq8GLG093A54hLRzaWszSpQax09YT1Swv nrhDELgQOZtcmyvDsipXbuTMDQ9s2S6DbUwtQn8U7xqMpKkrz95yRxoKfu28txJ8PG b71bZNJ0hXpYaYsVx/gLuK2kow8o0xv7iZEhYLoHtbD3uqEgMFsAvP8NrgJjJ1tmHf G4VOKKkVNIT0Q== From: Sasha Levin To: stable@vger.kernel.org, alexander.usyskin@intel.com Cc: stable , Rohit Agarwal , Brian Geffon , Tomas Winkler , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: FAILED: Patch "mei: use kvmalloc for read buffer" failed to apply to v5.15-stable tree Date: Tue, 5 Nov 2024 21:12:03 -0500 Message-ID: <20241106021203.182660-1-sashal@kernel.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-Patchwork-Hint: ignore X-stable: review Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The patch below does not apply to the v5.15-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 . Thanks, Sasha Acked-by: Tomas Winkler Reported-by: Rohit Agarwal Tested-by: Brian Geffon ------------------ original commit in Linus's tree ------------------ From 4adf613e01bf99e1739f6ff3e162ad5b7d578d1a Mon Sep 17 00:00:00 2001 From: Alexander Usyskin Date: Tue, 15 Oct 2024 15:31:57 +0300 Subject: [PATCH] mei: use kvmalloc for read buffer Read buffer is allocated according to max message size, reported by the firmware and may reach 64K in systems with pxp client. Contiguous 64k allocation may fail under memory pressure. Read buffer is used as in-driver message storage and not required to be contiguous. Use kvmalloc to allow kernel to allocate non-contiguous memory. Fixes: 3030dc056459 ("mei: add wrapper for queuing control commands.") Cc: stable Reported-by: Rohit Agarwal Closes: https://lore.kernel.org/all/20240813084542.2921300-1-rohiagar@chrom= ium.org/ Tested-by: Brian Geffon Signed-off-by: Alexander Usyskin Acked-by: Tomas Winkler Link: https://lore.kernel.org/r/20241015123157.2337026-1-alexander.usyskin@= intel.com Signed-off-by: Greg Kroah-Hartman --- drivers/misc/mei/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 9d090fa07516f..be011cef12e5d 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -321,7 +321,7 @@ void mei_io_cb_free(struct mei_cl_cb *cb) return; =20 list_del(&cb->list); - kfree(cb->buf.data); + kvfree(cb->buf.data); kfree(cb->ext_hdr); kfree(cb); } @@ -497,7 +497,7 @@ struct mei_cl_cb *mei_cl_alloc_cb(struct mei_cl *cl, si= ze_t length, if (length =3D=3D 0) return cb; =20 - cb->buf.data =3D kmalloc(roundup(length, MEI_SLOT_SIZE), GFP_KERNEL); + cb->buf.data =3D kvmalloc(roundup(length, MEI_SLOT_SIZE), GFP_KERNEL); if (!cb->buf.data) { mei_io_cb_free(cb); return NULL; --=20 2.43.0