hi Luca, On Wed, May 25, 2011 at 7:16 PM, Luciano Coelho <coelho@xxxxxx> wrote: > Fix kernel oops when trying to use passive scheduled scans. The > reason was that in passive scans there are no SSIDs, so there was a > NULL pointer dereference. > > To solve the problem, we now check the number of SSIDs provided in the > sched_scan request and only access the list if there's one or more > (ie. passive scan is not forced). We also move the channels from > active to passive if passive scanning is forced. For this to work, > it's necessary to set both active and passive dwell times for all > channels. > > Signed-off-by: Luciano Coelho <coelho@xxxxxx> > --- [...] why does sched scan without ssids means passive scan? can't we just do active sched scan without ssids? > + if (force_passive) { > + /* move active channels to passive lists */ > + cfg->passive[0] += cfg->active[0] - 1; > + cfg->active[0] = 1; looks like a potential integer underflow. if you're forcing a passive scan, why do you need to set an active channel? anyway, this seems a bit wrong. i don't think you can just do "arbitrary transfers" of the channel counts, as their order seem to matter (i.e. the order of elements in the channel array is passive[0],passive[1],..,active[0],active[1]..., so you actually need to shift all the elements) Eliad. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html