]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
smb: client: change allocation requirements in smb2_compound_op
authorFredric Cover <fredric.cover.lkernel@gmail.com>
Wed, 29 Apr 2026 21:34:53 +0000 (14:34 -0700)
committerSteve French <stfrench@microsoft.com>
Wed, 29 Apr 2026 22:26:07 +0000 (17:26 -0500)
Currently, smb2_compound_op() allocates
struct smb2_compound_vars *vars using GFP_ATOMIC, although
smb2_compound_op() can sleep when it calls compound_send_recv()
before vars is freed.

Allocate vars using GFP_KERNEL.

Signed-off-by: Fredric Cover <fredric.cover.lkernel@gmail.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/smb/client/smb2inode.c

index c6dd282fc3a9013ac8b403a7f0f244dcd7a67de5..286912616c7339a81d80e17d99219128f591c8b8 100644 (file)
@@ -230,7 +230,7 @@ replay_again:
        num_rqst = 0;
        server = cifs_pick_channel(ses);
 
-       vars = kzalloc_obj(*vars, GFP_ATOMIC);
+       vars = kzalloc_obj(*vars, GFP_KERNEL);
        if (vars == NULL) {
                rc = -ENOMEM;
                goto out;