Commit dda8ad0a authored by Takashi Sakamoto's avatar Takashi Sakamoto Committed by Takashi Iwai
Browse files

firewire: cdev: fix potential leak of kernel stack due to uninitialized value



Recent change brings potential leak of value on kernel stack to userspace
due to uninitialized value.

This commit fixes the bug.

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: baa914cd ("firewire: add kernel API to access CYCLE_TIME register")
Signed-off-by: default avatarTakashi Sakamoto <o-takashi@sakamocchi.jp>
Link: https://lore.kernel.org/r/20220512112037.103142-1-o-takashi@sakamocchi.jp


Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 56ec3e75
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1211,7 +1211,7 @@ static int ioctl_get_cycle_timer2(struct client *client, union ioctl_arg *arg)
	struct fw_cdev_get_cycle_timer2 *a = &arg->get_cycle_timer2;
	struct fw_card *card = client->device->card;
	struct timespec64 ts = {0, 0};
	u32 cycle_time;
	u32 cycle_time = 0;
	int ret = 0;

	local_irq_disable();