linux-cifs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN
@ 2023-03-16 13:40 Marios Makassikis
  2023-03-25  8:35 ` Namjae Jeon
  0 siblings, 1 reply; 2+ messages in thread
From: Marios Makassikis @ 2023-03-16 13:40 UTC (permalink / raw)
  To: linux-cifs; +Cc: Marios Makassikis

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(-)

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


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN
  2023-03-16 13:40 [PATCH] ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN Marios Makassikis
@ 2023-03-25  8:35 ` Namjae Jeon
  0 siblings, 0 replies; 2+ messages in thread
From: Namjae Jeon @ 2023-03-25  8:35 UTC (permalink / raw)
  To: Marios Makassikis; +Cc: linux-cifs

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
>
>

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2023-03-25  8:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 13:40 [PATCH] ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN Marios Makassikis
2023-03-25  8:35 ` Namjae Jeon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).