lkml.org 
[lkml]   [2019]   [Oct]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: Potential uninitialized variables in cfg80211
From
Date
On Tue, 2019-10-08 at 14:19 -0700, Yizhuo Zhai wrote:
> Hi All:
> net/wireless/chan.c:
> Inside function cfg80211_chandef_compatible(), variable "c1_pri40",
> " c2_pri40", "c1_pri80" and "c2_pri80" could be uninitialized if
> chandef_primary_freqs() fails. However, they are used later in the if
> statement to decide the control flow, which is potentially unsafe.

I guess theoretically this is right, but the function should only be
called with valid chandefs, and if chandef_primary_freqs() hit the
warning then the chandef certainly wasn't valid.

johannes

\
 
 \ /
  Last update: 2019-10-09 08:46    [W:0.020 / U:10.708 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site