Skip to contentSkip to conversation

smb: client: change allocation requirements in smb2_compound_op

PATCH New Fredric Cover 1 participant 1 message Apr 29

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 smb: client: change allocation requirements in smb2_compound_op

From: Fredric Cover <[email protected]>

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.

---
Please note that I am new to patching the Linux kernel. I appreciate advice.

---
 fs/smb/client/smb2inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/smb/client/smb2inode.c +1 -1
index c6dd282fc..286912616 100644
@@ -230,7 +230,7 @@ static int smb2_compound_op(const unsigned int xid, struct cifs_tcon *tcon,
 	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;
Signature · 1 line
2.43.0