[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210121092510.GA648258@wp.pl>
Date: Thu, 21 Jan 2021 10:25:10 +0100
From: Stanislaw Gruszka <stf_xl@...pl>
To: 慕冬亮 <mudongliangabcd@...il.com>
Cc: davem@...emloft.net, helmut.schaa@...glemail.com, kuba@...nel.org,
kvalo@...eaurora.org, linux-kernel <linux-kernel@...r.kernel.org>,
linux-wireless@...r.kernel.org, netdev@...r.kernel.org,
Greg KH <greg@...ah.com>,
syzkaller-bugs <syzkaller-bugs@...glegroups.com>,
syzkaller <syzkaller@...glegroups.com>
Subject: Re: "KMSAN: uninit-value in rt2500usb_bbp_read" and "KMSAN:
uninit-value in rt2500usb_probe_hw" should be duplicate crash reports
On Thu, Jan 21, 2021 at 04:47:37PM +0800, 慕冬亮 wrote:
> ## Patch
>
> I propose to memset reg variable before invoking
> rt2x00usb_vendor_req_buff_lock/rt2x00usb_vendor_request_buff.
>
> ------------------------------------------------------------------------------------------------------------------------
> diff --git a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
> b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
> index fce05fc88aaf..f6c93a25b18c 100644
> --- a/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
> +++ b/drivers/net/wireless/ralink/rt2x00/rt2500usb.c
> @@ -48,6 +48,7 @@ static u16 rt2500usb_register_read(struct rt2x00_dev
> *rt2x00dev,
> const unsigned int offset)
> {
> __le16 reg;
> + memset(®, 0, sizeof(reg));
Simpler would be just to initialize like this: __le16 reg = 0;
Stanislaw
Powered by blists - more mailing lists