This is a note to let you know that I've just added the patch titled ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN to the 6.1-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ksmbd-do-not-call-kvmalloc-with-__gfp_noretry-__gfp_no_warn.patch and it can be found in the queue-6.1 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From e416ea62a9166e6075a07a970cc5bf79255d2700 Mon Sep 17 00:00:00 2001 From: Marios Makassikis <mmakassikis@xxxxxxxxxx> Date: Thu, 16 Mar 2023 14:40:43 +0100 Subject: ksmbd: do not call kvmalloc() with __GFP_NORETRY | __GFP_NO_WARN From: Marios Makassikis <mmakassikis@xxxxxxxxxx> commit e416ea62a9166e6075a07a970cc5bf79255d2700 upstream. Commit 83dcedd5540d ("ksmbd: fix infinite loop in ksmbd_conn_handler_loop()"), changes GFP modifiers passed to kvmalloc(). This cause xfstests generic/551 test to fail. We limit pdu length size according to connection status and maximum number of connections. In the rest, memory allocation of request is limited by credit management. so these flags are no longer needed. Fixes: 83dcedd5540d ("ksmbd: fix infinite loop in ksmbd_conn_handler_loop()") Cc: stable@xxxxxxxxxxxxxxx Signed-off-by: Marios Makassikis <mmakassikis@xxxxxxxxxx> Acked-by: Namjae Jeon <linkinjeon@xxxxxxxxxx> Signed-off-by: Steve French <stfrench@xxxxxxxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ksmbd/connection.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/fs/ksmbd/connection.c +++ b/fs/ksmbd/connection.c @@ -326,10 +326,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; Patches currently in stable-queue which might be from mmakassikis@xxxxxxxxxx are queue-6.1/ksmbd-do-not-call-kvmalloc-with-__gfp_noretry-__gfp_no_warn.patch