1. 25 Nov, 2016 4 commits
  2. 23 Nov, 2016 12 commits
  3. 19 Nov, 2016 15 commits
  4. 18 Nov, 2016 3 commits
  5. 17 Nov, 2016 6 commits
    • Ricky Liang's avatar
      mwifiex: fix memory leak in mwifiex_save_hidden_ssid_channels() · 5ff26222
      Ricky Liang authored
      kmemleak reports memory leak in mwifiex_save_hidden_ssid_channels():
      
      unreferenced object 0xffffffc0a2914780 (size 192):
        comm "ksdioirqd/mmc2", pid 2004, jiffies 4307182506 (age 820.684s)
        hex dump (first 32 bytes):
          00 06 47 49 4e 2d 32 67 01 03 c8 60 6c 03 01 40  ..GIN-2g...`l..@
          07 10 54 57 20 34 04 1e 64 05 24 84 03 24 95 04  ..TW 4..d.$..$..
        backtrace:
          [<ffffffc0003375f4>] create_object+0x164/0x2b4
          [<ffffffc0008e3530>] kmemleak_alloc+0x50/0x88
          [<ffffffc000335120>] __kmalloc_track_caller+0x1bc/0x264
          [<ffffffc00030899c>] kmemdup+0x38/0x64
          [<ffffffbffc2311cc>] mwifiex_fill_new_bss_desc+0x3c/0x130 [mwifiex]
          [<ffffffbffc22ee9c>] mwifiex_save_curr_bcn+0x4ec/0x640 [mwifiex]
          [<ffffffbffc22f45c>] mwifiex_handle_event_ext_scan_report+0x1d4/0x268 [mwifiex]
          [<ffffffbffc2375d0>] mwifiex_process_sta_event+0x378/0x898 [mwifiex]
          [<ffffffbffc224dc8>] mwifiex_process_event+0x1a8/0x1e8 [mwifiex]
          [<ffffffbffc2228f0>] mwifiex_main_process+0x258/0x534 [mwifiex]
          [<ffffffbffc258858>] 0xffffffbffc258858
          [<ffffffc00071ee90>] process_sdio_pending_irqs+0xf8/0x160
          [<ffffffc00071efdc>] sdio_irq_thread+0x9c/0x1a4
          [<ffffffc000240d08>] kthread+0xf4/0x100
          [<ffffffc0002043fc>] ret_from_fork+0xc/0x50
          [<ffffffffffffffff>] 0xffffffffffffffff
      Signed-off-by: default avatarRicky Liang <jcliang@chromium.org>
      Acked-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
      Reviewed-by: default avatarBrian Norris <briannorris@chromium.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      5ff26222
    • Larry Finger's avatar
      ssb: Fix error routine when fallback SPROM fails · 8052d724
      Larry Finger authored
      When there is a CRC error in the SPROM read from the device, the code
      attempts to handle a fallback SPROM. When this also fails, the driver
      returns zero rather than an error code.
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Stable <stable@vger.kernel.org>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      8052d724
    • Wei Yongjun's avatar
      rtlwifi: Use dev_kfree_skb_irq instead of kfree_skb · e4965614
      Wei Yongjun authored
      It is not allowed to call kfree_skb() from hardware interrupt
      context or with interrupts being disabled, spin_lock_irqsave()
      make sure always in irq disable context. So the kfree_skb()
      should be replaced with dev_kfree_skb_irq().
      
      This is detected by Coccinelle semantic patch.
      Signed-off-by: default avatarWei Yongjun <weiyongjun1@huawei.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      e4965614
    • Arnd Bergmann's avatar
      cw1200: fix bogus maybe-uninitialized warning · 7fc1503c
      Arnd Bergmann authored
      On x86, the cw1200 driver produces a rather silly warning about the
      possible use of the 'ret' variable without an initialization
      presumably after being confused by the architecture specific definition
      of WARN_ON:
      
      drivers/net/wireless/st/cw1200/wsm.c: In function ‘wsm_handle_rx’:
      drivers/net/wireless/st/cw1200/wsm.c:1457:9: error: ‘ret’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      We have already checked that 'count' is larger than 0 here, so
      we know that 'ret' is initialized. Changing the 'for' loop
      into do/while also makes this clear to the compiler.
      Suggested-by: default avatarDavid Laight <David.Laight@ACULAB.COM>
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      7fc1503c
    • Arnd Bergmann's avatar
      wireless: fix bogus maybe-uninitialized warning · 10f3366b
      Arnd Bergmann authored
      The hostap_80211_rx() function is supposed to set up the mac addresses
      for four possible cases, based on two bits of input data. For
      some reason, gcc decides that it's possible that none of the these
      four cases apply and the addresses remain uninitialized:
      
      drivers/net/wireless/intersil/hostap/hostap_80211_rx.c: In function ‘hostap_80211_rx’:
      arch/x86/include/asm/string_32.h:77:14: warning: ‘src’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      drivers/net/wireless/intel/ipw2x00/libipw_rx.c: In function ‘libipw_rx’:
      arch/x86/include/asm/string_32.h:77:14: error: ‘dst’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      arch/x86/include/asm/string_32.h:78:22: error: ‘*((void *)&dst+4)’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
      
      This warning is clearly nonsense, but changing the last case into
      'default' makes it obvious to the compiler too, which avoids the
      warning and probably leads to better object code too.
      
      The same code is duplicated several times in the kernel, so this
      patch uses the same workaround for all copies. The exact configuration
      was hit only very rarely in randconfig builds and I only saw it
      in three drivers, but I assume that all of them are potentially
      affected, and it's better to keep the code consistent.
      Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      10f3366b
    • Jiri Slaby's avatar
      p54: memset(0) whole array · 6f175817
      Jiri Slaby authored
      gcc 7 complains:
      drivers/net/wireless/intersil/p54/fwio.c: In function 'p54_scan':
      drivers/net/wireless/intersil/p54/fwio.c:491:4: warning: 'memset' used with length equal to number of elements without multiplication by element size [-Wmemset-elt-size]
      
      Fix that by passing the correct size to memset.
      Signed-off-by: default avatarJiri Slaby <jslaby@suse.cz>
      Cc: Christian Lamparter <chunkeey@googlemail.com>
      Cc: Kalle Valo <kvalo@codeaurora.org>
      Cc: linux-wireless@vger.kernel.org
      Cc: netdev@vger.kernel.org
      Acked-by: default avatarChristian Lamparter <chunkeey@googlemail.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      6f175817