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

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

parents 5d0e927e f86d2b8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ static long do_sys_name_to_handle(const 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;