Unverified Commit 272e398d authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!6476 do_sys_name_to_handle(): use kzalloc() to fix kernel-infoleak

parents 06f1917c ae92f656
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -37,7 +37,7 @@ static long do_sys_name_to_handle(struct path *path,
	if (f_handle.handle_bytes > MAX_HANDLE_SZ)
		return -EINVAL;

	handle = kmalloc(sizeof(struct file_handle) + f_handle.handle_bytes,
	handle = kzalloc(sizeof(struct file_handle) + f_handle.handle_bytes,
			 GFP_KERNEL);
	if (!handle)
		return -ENOMEM;