From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933836AbdDFQs2 (ORCPT ); Thu, 6 Apr 2017 12:48:28 -0400 Received: from mail-pg0-f54.google.com ([74.125.83.54]:36076 "EHLO mail-pg0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754742AbdDFQsR (ORCPT ); Thu, 6 Apr 2017 12:48:17 -0400 Date: Thu, 6 Apr 2017 09:48:08 -0700 From: Brian Norris To: Kalle Valo Cc: Nishant Sarmukadam , Ganapathi Bhat , Xinming Hu , linux-kernel@vger.kernel.org, Dmitry Torokhov , netdev@vger.kernel.org, linux-wireless@vger.kernel.org Subject: Re: [PATCH] mwifiex: MAC randomization should not be persistent Message-ID: <20170406164807.GB25323@google.com> References: <20170405222640.4494-1-briannorris@chromium.org> <87inmifak8.fsf@kamboji.qca.qualcomm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87inmifak8.fsf@kamboji.qca.qualcomm.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 06, 2017 at 07:02:15AM +0300, Kalle Valo wrote: > Brian Norris writes: > > > nl80211 provides the NL80211_SCAN_FLAG_RANDOM_ADDR for every scan > > request that should be randomized; the absence of such a flag means we > > should not randomize. However, mwifiex was stashing the latest > > randomization request and *always* using it for future scans, even those > > that didn't set the flag. > > > > Let's zero out the randomization info whenever we get a scan request > > without NL80211_SCAN_FLAG_RANDOM_ADDR. I'd prefer to remove > > priv->random_mac entirely (and plumb the randomization MAC properly > > through the call sequence), but the spaghetti is a little difficult to > > unravel here for me. > > > > Fixes: c2a8f0ff9c6c ("mwifiex: support random MAC address for scanning") > > So the first release with this was v4.9. > > > Signed-off-by: Brian Norris > > --- > > Should this be tagged for -stable? > > IMHO yes. Sounds fine to me. I suppose you'll do this when applying? Or I can resend... Brian