Thread (10 messages) 10 messages, 4 authors, 2021-06-30

Re: [RFC PATCH] cw1200: use kmalloc() allocation instead of stack

flat view

From: Arnd Bergmann <arnd@arndb.de>
Date: 2021-06-30 12:21:48
Also in: linux-wireless, lkml

On Wed, Jun 30, 2021 at 2:03 PM Ulf Hansson [off-list ref] wrote:
quoted
diff --git a/drivers/mmc/core/sdio_ops.c b/drivers/mmc/core/sdio_ops.c
index 4c229dd2b6e5..845f9ca3b200 100644
--- a/drivers/mmc/core/sdio_ops.c
+++ b/drivers/mmc/core/sdio_ops.c
@@ -124,6 +124,7 @@ int mmc_io_rw_extended(struct mmc_card *card, int
write, unsigned fn,
        int err;

        WARN_ON(blksz == 0);
+       WARN_ON_ONCE(is_vmalloc_or_module_addr(buf) || object_is_on_stack(buf));
Looks reasonable to me, at least we should start giving a warning.
Would you like to send a formal patch that we can test?
Done.

        Arnd
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help