1. 15 Feb, 2017 7 commits
    • Larry Finger's avatar
      rtlwifi: btcoexist: Fix if == else warnings in halbtc8723b1ant.c · b686784d
      Larry Finger authored
      The 0-DAY kernel test infrastructure reports the following:
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:1875:2-4: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8723b1ant.c:2253:3-5: WARNING: possible condition with no effect (if == else)
      
      Reported-by: kbuild-all@01.org
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Julia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      b686784d
    • Larry Finger's avatar
      rtlwifi: btcoexist: Fix if == else warnings in halbtc8821a1ant.c · 42e74946
      Larry Finger authored
      The 0-DAY kernel test infrastructure reports the following:
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:1771:1-3: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a1ant.c:2126:3-5: WARNING: possible condition with no effect (if == else)
      
      Reported-by: kbuild-all@01.org
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Julia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      42e74946
    • Larry Finger's avatar
      rtlwifi: btcoexist: Fix if == else warnings in halbtc8821a2ant.c · ac0ca72c
      Larry Finger authored
      The 0-DAY kernel test infrastructure reports the following:
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3023:1-3: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3035:2-4: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3037:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3047:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3075:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3085:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3129:1-3: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3141:2-4: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3143:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3153:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3179:2-4: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3181:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:3192:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2677:1-3: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2833:1-3: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2847:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2857:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2885:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2895:3-5: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2940:1-3: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2788:2-4: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2391:2-4: WARNING: possible condition with no effect (if == else)
      drivers/net/wireless/realtek/rtlwifi/btcoexist/halbtc8821a2ant.c:2417:2-4: WARNING: possible condition with no effect (if == else)
      
      Reported-by: kbuild-all@01.org
      Signed-off-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Julia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      ac0ca72c
    • Brian Norris's avatar
      mwifiex: don't enable/disable IRQ 0 during suspend/resume · 2447e2ca
      Brian Norris authored
      If we don't have an out-of-band wakeup IRQ configured through DT (as
      most platforms don't), then we fall out of this function with
      'irq_wakeup == 0'. Other code (e.g., mwifiex_disable_wake() and
      mwifiex_enable_wake()) treats 'irq_wakeup >= 0' as a valid IRQ, and so
      we end up calling {enable,disable}_irq() on IRQ 0.
      
      That seems bad, so let's not do that.
      
      Same problem as fixed in this patch:
      
      https://patchwork.kernel.org/patch/9531693/
      [PATCH v2 2/3] btmrvl: set irq_bt to -1 when failed to parse it
      
      with the difference that:
      (a) this one is actually a regression and
      (b) this affects both device tree and non-device-tree systems
      
      While fixing the regression, also drop the verbosity on the parse
      failure, so we don't see this when a DT node is present but doesn't have
      an interrupt property (this is perfectly legal):
      
      [   21.999000] mwifiex_pcie 0000:01:00.0: fail to parse irq_wakeup from device tree
      
      Fixes: 853402a0 ("mwifiex: Enable WoWLAN for both sdio and pcie")
      Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
      Acked-by: default avatarRajat Jain <rajatja@google.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      2447e2ca
    • Tobias Klauser's avatar
      orinoco: Use net_device_stats from struct net_device · 3a628204
      Tobias Klauser authored
      Instead of using a private copy of struct net_device_stats in
      struct orinoco_private, use stats from struct net_device. Also remove
      the now unnecessary .ndo_get_stats function.
      Signed-off-by: default avatarTobias Klauser <tklauser@distanz.ch>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      3a628204
    • Julia Lawall's avatar
      rtlwifi: btcoexist: fix semicolon.cocci warnings · 7546bba3
      Julia Lawall authored
      Remove unneeded semicolon.
      
      Generated by: scripts/coccinelle/misc/semicolon.cocci
      
      CC: Larry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarJulia Lawall <julia.lawall@lip6.fr>
      Signed-off-by: default avatarFengguang Wu <fengguang.wu@intel.com>
      Acked-by: default avatarLarry Finger <Larry.Finger@lwfinger.net>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      7546bba3
    • Iain Hunter's avatar
      wlcore: disable multicast filter in AP mode · 1f866532
      Iain Hunter authored
      Enable AP support for allmulticast for MDNS. It can be enabled by bringing
      up the interface with ip command with argument allmulticast on
      Signed-off-by: default avatarIain Hunter <i-hunter1@ti.com>
      Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
      1f866532
  2. 13 Feb, 2017 23 commits
  3. 12 Feb, 2017 10 commits
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: honor NFT_SET_OBJECT in set backend selection · 7286ff7f
      Pablo Neira Ayuso authored
      Check for NFT_SET_OBJECT feature flag, otherwise we may end up selecting
      the wrong set backend.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      7286ff7f
    • Pablo Neira Ayuso's avatar
      netfilter: update MAINTAINERS · fc52497e
      Pablo Neira Ayuso authored
      It's been a while since Patrick has been suspended as coreteam member [1].
      Update this file to remove him.
      
      While at this, remove references to all foo-tables variants, given the
      project hosts more than just that, eg. ipset, conntrack, ...
      
      [1] https://marc.info/?l=netfilter-devel&m=146887464512702Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      fc52497e
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: add NFTA_RULE_ID attribute · 1a94e38d
      Pablo Neira Ayuso authored
      This new attribute allows us to uniquely identify a rule in transaction.
      Robots may trigger an insertion followed by deletion in a batch, in that
      scenario we still don't have a public rule handle that we can use to
      delete the rule. This is similar to the NFTA_SET_ID attribute that
      allows us to refer to an anonymous set from a batch.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      1a94e38d
    • Pablo Neira Ayuso's avatar
      netfilter: nf_tables: add check_genid to the nfnetlink subsystem · 74e8bcd2
      Pablo Neira Ayuso authored
      This patch implements the check generation id as provided by nfnetlink.
      This allows us to reject ruleset updates against stale baseline, so
      userspace can retry update with a fresh ruleset cache.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      74e8bcd2
    • Pablo Neira Ayuso's avatar
      netfilter: nfnetlink: allow to check for generation ID · 8c4d4e8b
      Pablo Neira Ayuso authored
      This patch allows userspace to specify the generation ID that has been
      used to build an incremental batch update.
      
      If userspace specifies the generation ID in the batch message as
      attribute, then nfnetlink compares it to the current generation ID so
      you make sure that you work against the right baseline. Otherwise, bail
      out with ERESTART so userspace knows that its changeset is stale and
      needs to respin. Userspace can do this transparently at the cost of
      taking slightly more time to refresh caches and rework the changeset.
      
      This check is optional, if there is no NFNL_BATCH_GENID attribute in the
      batch begin message, then no check is performed.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      8c4d4e8b
    • Pablo Neira Ayuso's avatar
      netfilter: nfnetlink: add nfnetlink_rcv_skb_batch() · 48656835
      Pablo Neira Ayuso authored
      Add new nfnetlink_rcv_skb_batch() to wrap initial nfnetlink batch
      handling.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      48656835
    • Pablo Neira Ayuso's avatar
      netfilter: nfnetlink: get rid of u_intX_t types · b745d035
      Pablo Neira Ayuso authored
      Use uX types instead.
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      b745d035
    • Gao Feng's avatar
      netfilter: nf_ct_expect: nf_ct_expect_insert() returns void · 4dee62b1
      Gao Feng authored
      Because nf_ct_expect_insert() always succeeds now, its return value can
      be just void instead of int. And remove code that checks for its return
      value.
      Signed-off-by: default avatarGao Feng <fgao@ikuai8.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      4dee62b1
    • Gao Feng's avatar
      netfilter: nf_ct_sip: Use mod_timer_pending() · a96e66e7
      Gao Feng authored
      timer_del() followed by timer_add() can be replaced by
      mod_timer_pending().
      Signed-off-by: default avatarGao Feng <fgao@ikuai8.com>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      a96e66e7
    • Eric Dumazet's avatar
      net_sched: fix error recovery at qdisc creation · 87b60cfa
      Eric Dumazet authored
      Dmitry reported uses after free in qdisc code [1]
      
      The problem here is that ops->init() can return an error.
      
      qdisc_create_dflt() then call ops->destroy(),
      while qdisc_create() does _not_ call it.
      
      Four qdisc chose to call their own ops->destroy(), assuming their caller
      would not.
      
      This patch makes sure qdisc_create() calls ops->destroy()
      and fixes the four qdisc to avoid double free.
      
      [1]
      BUG: KASAN: use-after-free in mq_destroy+0x242/0x290 net/sched/sch_mq.c:33 at addr ffff8801d415d440
      Read of size 8 by task syz-executor2/5030
      CPU: 0 PID: 5030 Comm: syz-executor2 Not tainted 4.3.5-smp-DEV #119
      Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011
       0000000000000046 ffff8801b435b870 ffffffff81bbbed4 ffff8801db000400
       ffff8801d415d440 ffff8801d415dc40 ffff8801c4988510 ffff8801b435b898
       ffffffff816682b1 ffff8801b435b928 ffff8801d415d440 ffff8801c49880c0
      Call Trace:
       [<ffffffff81bbbed4>] __dump_stack lib/dump_stack.c:15 [inline]
       [<ffffffff81bbbed4>] dump_stack+0x6c/0x98 lib/dump_stack.c:51
       [<ffffffff816682b1>] kasan_object_err+0x21/0x70 mm/kasan/report.c:158
       [<ffffffff81668524>] print_address_description mm/kasan/report.c:196 [inline]
       [<ffffffff81668524>] kasan_report_error+0x1b4/0x4b0 mm/kasan/report.c:285
       [<ffffffff81668953>] kasan_report mm/kasan/report.c:305 [inline]
       [<ffffffff81668953>] __asan_report_load8_noabort+0x43/0x50 mm/kasan/report.c:326
       [<ffffffff82527b02>] mq_destroy+0x242/0x290 net/sched/sch_mq.c:33
       [<ffffffff82524bdd>] qdisc_destroy+0x12d/0x290 net/sched/sch_generic.c:953
       [<ffffffff82524e30>] qdisc_create_dflt+0xf0/0x120 net/sched/sch_generic.c:848
       [<ffffffff8252550d>] attach_default_qdiscs net/sched/sch_generic.c:1029 [inline]
       [<ffffffff8252550d>] dev_activate+0x6ad/0x880 net/sched/sch_generic.c:1064
       [<ffffffff824b1db1>] __dev_open+0x221/0x320 net/core/dev.c:1403
       [<ffffffff824b24ce>] __dev_change_flags+0x15e/0x3e0 net/core/dev.c:6858
       [<ffffffff824b27de>] dev_change_flags+0x8e/0x140 net/core/dev.c:6926
       [<ffffffff824f5bf6>] dev_ifsioc+0x446/0x890 net/core/dev_ioctl.c:260
       [<ffffffff824f61fa>] dev_ioctl+0x1ba/0xb80 net/core/dev_ioctl.c:546
       [<ffffffff82430509>] sock_do_ioctl+0x99/0xb0 net/socket.c:879
       [<ffffffff82430d30>] sock_ioctl+0x2a0/0x390 net/socket.c:958
       [<ffffffff816f3b68>] vfs_ioctl fs/ioctl.c:44 [inline]
       [<ffffffff816f3b68>] do_vfs_ioctl+0x8a8/0xe50 fs/ioctl.c:611
       [<ffffffff816f41a4>] SYSC_ioctl fs/ioctl.c:626 [inline]
       [<ffffffff816f41a4>] SyS_ioctl+0x94/0xc0 fs/ioctl.c:617
       [<ffffffff8123e357>] entry_SYSCALL_64_fastpath+0x12/0x17
      Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
      Reported-by: default avatarDmitry Vyukov <dvyukov@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      87b60cfa