diff mbox series

ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN

Message ID 20230316134043.1824345-1-mmakassikis@freebox.fr (mailing list archive)
State New, archived
Headers show
Series ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN | expand

Commit Message

Marios Makassikis March 16, 2023, 1:40 p.m. UTC
Commit 83dcedd5540 ("ksmbd: fix infinite loop in ksmbd_conn_handler_loop()"),
changes GFP modifiers passed to kvmalloc(). However, the latter calls
kvmalloc_node() which does not support __GFP_NORETRY.

Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
---
 fs/ksmbd/connection.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

Comments

Namjae Jeon March 25, 2023, 8:35 a.m. UTC | #1
2023-03-16 22:40 GMT+09:00, Marios Makassikis <mmakassikis@freebox.fr>:
> Commit 83dcedd5540 ("ksmbd: fix infinite loop in
> ksmbd_conn_handler_loop()"),
> changes GFP modifiers passed to kvmalloc(). However, the latter calls
> kvmalloc_node() which does not support __GFP_NORETRY.
>
> Signed-off-by: Marios Makassikis <mmakassikis@freebox.fr>
This patch fix generic/551 test. I will directly update the patch description.

Acked-by: Namjae Jeon <linkinjeon@kernel.org>

Thanks.

> ---
>  fs/ksmbd/connection.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
>
> diff --git a/fs/ksmbd/connection.c b/fs/ksmbd/connection.c
> index 5b10b03800c1..54e077597f4e 100644
> --- a/fs/ksmbd/connection.c
> +++ b/fs/ksmbd/connection.c
> @@ -329,10 +329,7 @@ int ksmbd_conn_handler_loop(void *p)
>
>  		/* 4 for rfc1002 length field */
>  		size = pdu_size + 4;
> -		conn->request_buf = kvmalloc(size,
> -					     GFP_KERNEL |
> -					     __GFP_NOWARN |
> -					     __GFP_NORETRY);
> +		conn->request_buf = kvmalloc(size, GFP_KERNEL);
>  		if (!conn->request_buf)
>  			break;
>
> --
> 2.34.1
>
>
diff mbox series

Patch

diff --git a/fs/ksmbd/connection.c b/fs/ksmbd/connection.c
index 5b10b03800c1..54e077597f4e 100644
--- a/fs/ksmbd/connection.c
+++ b/fs/ksmbd/connection.c
@@ -329,10 +329,7 @@  int ksmbd_conn_handler_loop(void *p)
 
 		/* 4 for rfc1002 length field */
 		size = pdu_size + 4;
-		conn->request_buf = kvmalloc(size,
-					     GFP_KERNEL |
-					     __GFP_NOWARN |
-					     __GFP_NORETRY);
+		conn->request_buf = kvmalloc(size, GFP_KERNEL);
 		if (!conn->request_buf)
 			break;