FAILED: Patch "mei: use kvmalloc for read buffer" failed to apply to v5.10-stable tree
Subsystems (3)
Sasha Levin
maintainerThe patch below does not apply to the v5.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 <[email protected]>.
Thanks,
Sasha
------------------ original commit in Linus's tree ------------------
From 4adf613e01bf99e1739f6ff3e162ad5b7d578d1a Mon Sep 17 00:00:00 2001
From: Alexander Usyskin <[email protected]>
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.
--- drivers/misc/mei/client.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/misc/mei/client.c +2 -2
@@ -321,7 +321,7 @@ void mei_io_cb_free(struct mei_cl_cb *cb)return ;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, size_t length,if (length ==0 )return cb; - cb->buf.data =kmalloc (roundup (length,MEI_SLOT_SIZE ),GFP_KERNEL ); + cb->buf.data =kvmalloc (roundup (length,MEI_SLOT_SIZE ),GFP_KERNEL );if (!cb->buf.data) {mei_io_cb_free (cb);return NULL ;
Signature · 1 line
2.43.0