]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
ksmbd: use kzalloc() instead of __GFP_ZERO
authorNamjae Jeon <linkinjeon@kernel.org>
Mon, 18 Dec 2023 15:34:05 +0000 (00:34 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Dec 2023 09:41:56 +0000 (10:41 +0100)
[ Upstream commit f87d4f85f43f0d4b12ef64b015478d8053e1a33e ]

Use kzalloc() instead of __GFP_ZERO.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Namjae Jeon <linkinjeon@kernel.org>
Reviewed-by: Sergey Senozhatsky <senozhatsky@chromium.org>
Signed-off-by: Steve French <stfrench@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ksmbd/smb_common.c

index d937e2f45c829a6d06d9a9c76b20c3cfaece4672..08d95e1ecc5ee2998b949208e6d1e267cac453b5 100644 (file)
@@ -359,8 +359,8 @@ static int smb1_check_user_session(struct ksmbd_work *work)
  */
 static int smb1_allocate_rsp_buf(struct ksmbd_work *work)
 {
-       work->response_buf = kmalloc(MAX_CIFS_SMALL_BUFFER_SIZE,
-                       GFP_KERNEL | __GFP_ZERO);
+       work->response_buf = kzalloc(MAX_CIFS_SMALL_BUFFER_SIZE,
+                       GFP_KERNEL);
        work->response_sz = MAX_CIFS_SMALL_BUFFER_SIZE;
 
        if (!work->response_buf) {