Skip to content

Commit a08d897

Browse files
committed
fix memory leak in large read decrypt offload
Spotted by Ronnie. Reviewed-by: Ronnie Sahlberg <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent d6d5df1 commit a08d897

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/cifs/smb2ops.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4084,6 +4084,7 @@ static void smb2_decrypt_offload(struct work_struct *work)
40844084

40854085
kfree(dw->ppages);
40864086
cifs_small_buf_release(dw->buf);
4087+
kfree(dw);
40874088
}
40884089

40894090

@@ -4157,7 +4158,7 @@ receive_encrypted_read(struct TCP_Server_Info *server, struct mid_q_entry **mid,
41574158
dw->server = server;
41584159
dw->ppages = pages;
41594160
dw->len = len;
4160-
queue_work(cifsiod_wq, &dw->decrypt);
4161+
queue_work(decrypt_wq, &dw->decrypt);
41614162
*num_mids = 0; /* worker thread takes care of finding mid */
41624163
return -1;
41634164
}

0 commit comments

Comments
 (0)