LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [BUG] memstick: rtsx_usb_ms: possible uninitialized-variable access in rtsx_usb_ms_issue_cmd()
@ 2021-07-31  6:36 Li Tuo
  0 siblings, 0 replies; only message in thread
From: Li Tuo @ 2021-07-31  6:36 UTC (permalink / raw)
  To: maximlevitsky, oakad, ulf.hansson; +Cc: linux-mmc, linux-kernel, baijiaju1990

Hello,

Our static analysis tool finds a possible uninitialized-variable access 
in the memstick driver in Linux 5.14.0-rc3:

At the beginning of the function rtsx_usb_ms_issue_cmd(), the variable 
int_reg is not initialized.
If the following condition is true, it remains uninitialized.
469:    if (req->long_data)

However, it is accessed in some statements such as:
491:    if (int_reg & MS_INT_CMDNK)

I am not quite sure whether this possible uninitialized-variable access 
is real and how to fix it if it is real.
Any feedback would be appreciated, thanks!

Reported-by: TOTE Robot <oslab@tsinghua.edu.cn>

Best wishes,
Tuo Li

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-07-31  6:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-31  6:36 [BUG] memstick: rtsx_usb_ms: possible uninitialized-variable access in rtsx_usb_ms_issue_cmd() Li Tuo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).