Skip to content

Commit

Permalink
ksmbd: use kzalloc() instead of __GFP_ZERO
Browse files Browse the repository at this point in the history
[ Upstream commit f87d4f8 ]

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: Sasha Levin <sashal@kernel.org>
  • Loading branch information
namjaejeon authored and gregkh committed Jan 5, 2024
1 parent 294a275 commit fe7977b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/smb/server/smb_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit fe7977b

Please sign in to comment.