1. 27 7月, 2017 2 次提交
  2. 26 7月, 2017 7 次提交
  3. 25 7月, 2017 17 次提交
  4. 21 7月, 2017 14 次提交
    • K
      Merge tag 'iwlwifi-for-kalle-2017-07-21' of... · d755cbc2
      Kalle Valo 提交于
      Merge tag 'iwlwifi-for-kalle-2017-07-21' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-fixes
      
      Some iwlwifi fixes for 4.13:
      
      * A few NULL pointer dereferences in the recovery flow;
      * A small but important fix for IBSS;
      * A one-liner fix for tracing, which was including too much data;
      * Some of these are bugzilla bug fixes;
      d755cbc2
    • J
      iwlwifi: mvm: defer setting IWL_MVM_STATUS_IN_HW_RESTART · bf8b286f
      Johannes Berg 提交于
      A hardware/firmware error may happen at any point in time. In
      particular, it might happen while mac80211 is in the middle of
      a flow. We observed the following situation:
       * mac80211 is in authentication flow, in ieee80211_prep_connection()
       * iwlwifi firmware crashes, but no error can be reported at this
         precise point (mostly because the driver method is void, but even
         if it wasn't we'd just shift to a race condition)
       * mac80211 continues the flow, trying to add the AP station
       * iwlwifi has already set its internal restart flag, and so thinks
         that adding the station is part of the restart and already set up,
         so it uses the information that's supposed to already be in the
         struct
      
      This can happen with any flow in mac80211 and with any information
      we try to preserve across hardware restarts.
      
      To fix this, only set a new HW_RESTART_REQUESTED flag and translate
      that to IN_HW_RESTART once mac80211 actually starts the restart by
      calling our start() method. As a consequence, any mac80211 flow in
      progress at the time of the restart will properly finish (certainly
      with errors), before the restart is attempted.
      
      This fixes https://bugzilla.kernel.org/show_bug.cgi?id=195299.
      Reported-by: Ndjagoo <dev@djagoo.io>
      Reported-by: NŁukasz Siudut <lsiudut@gmail.com>
      Signed-off-by: NJohannes Berg <johannes.berg@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      bf8b286f
    • L
      iwlwifi: mvm: handle IBSS probe_queue in a few missing places · 7b758a11
      Luca Coelho 提交于
      When IBSS was implemented for DQA, we missid a few places where it
      should be handled in the same way as AP.
      
      Fixes: ee48b722 ("iwlwifi: mvm: support ibss in dqa mode")
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      7b758a11
    • E
      iwlwifi: fix tracing when tx only is enabled · 5462bcd8
      Emmanuel Grumbach 提交于
      iwl_trace_data is somewhat confusing. It returns a bool
      that tells if the payload of the skb should be added to
      the tx_data event. If it returns false, then the payload
      of the skb is added to the tx event.
      
      The purpose is to be able to start tracing with
      -e iwlwifi
      and record non-data packets only which saves bandwidth.
      
      Since EAPOLs are important, seldom and not real data
      packet (despite being WiFi data packets), they are
      included in tx event and thus iwl_trace_data returns false
      on those. This last part was buggy, and because of that,
      all the data packets were included in the tx event.
      
      Fix that.
      
      Fixes: 0c4cb731 ("iwlwifi: tracing: decouple from mac80211")
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      5462bcd8
    • D
      iwlwifi: missing error code in iwl_trans_pcie_alloc() · 2388bd7b
      Dan Carpenter 提交于
      We don't set the error code here so we end up returning ERR_PTR(0) which
      is NULL.  The caller doesn't expect that so it results in a NULL
      dereference.
      
      Fixes: 2e5d4a8f ("iwlwifi: pcie: Add new configuration to enable MSIX")
      Signed-off-by: NDan Carpenter <dan.carpenter@oracle.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      2388bd7b
    • E
      iwlwifi: mvm: fix a NULL pointer dereference of error in recovery · 61dd8a8a
      Emmanuel Grumbach 提交于
      Sometimes, we can have an firmware crash while trying to
      recover from a previous firmware problem.
      When that happens, lots of things can go wrong. For example
      the stations don't get added properly to mvm->fw_id_to_mac_id.
      
      Mac80211 tries to stop A-MPDU upon reconfig but in case of
      a firmware crash we will bail out fairly early and in the
      end, we won't delete the A-MPDU Rx timeout.
      When that timer expired after a double firmware crash,
      we end up dereferencing mvm->fw_id_to_mac_id[sta_id]
      which is NULL.
      
      Fixes: 10b2b201 ("iwlwifi: mvm: add infrastructure for tracking BA session in driver")
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      61dd8a8a
    • M
      iwlwifi: pcie: fix unused txq NULL pointer dereference · f6eac740
      Mordechai Goodstein 提交于
      Before TVQM, all TX queues were allocated straight at init.
      With TVQM, queues are allocated on demand and hence we need
      to check if a queue exists before dereferencing it.
      
      Fixes: 66128fa08806 ("iwlwifi: move to TVQM mode")
      Signed-off-by: NMordechai Goodstein <mordechay.goodstein@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      f6eac740
    • E
      iwlwifi: dvm: prevent an out of bounds access · 0b0f934e
      Emmanuel Grumbach 提交于
      iwlagn_check_ratid_empty takes the tid as a parameter, but
      it doesn't check that it is not IWL_TID_NON_QOS.
      Since IWL_TID_NON_QOS = 8 and iwl_priv::tid_data is an array
      with 8 entries, accessing iwl_priv::tid_data[IWL_TID_NON_QOS]
      is a bad idea.
      This happened in iwlagn_rx_reply_tx. Since
      iwlagn_check_ratid_empty is relevant only to check whether
      we can open A-MPDU, this flow is irrelevant if tid is
      IWL_TID_NON_QOS. Call iwlagn_check_ratid_empty only inside
      the
      	if (tid != IWL_TID_NON_QOS)
      
      a few lines earlier in the function.
      
      Cc: <stable@vger.kernel.org>
      Reported-by: NSeraphime Kirkovski <kirkseraph@gmail.com>
      Tested-by: NSeraphime Kirkovski <kirkseraph@gmail.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      0b0f934e
    • L
      Revert "rtlwifi: btcoex: rtl8723be: fix ant_sel not work" · 271612d7
      Larry Finger 提交于
      This reverts commit f95d95a7.
      
      With commit f95d95a7 ("rtlwifi: btcoex: rtl8723be: fix ant_sel not
      work"), the kernel has a NULL pointer dereference oops. This content and
      the proper fix will be included in a later patch.
      
      Fixes: f95d95a7 ("rtlwifi: btcoex: rtl8723be: fix ant_sel not work")
      Signed-off-by: NLarry Finger <Larry.Finger@lwfinger.net>
      Cc: Ping-Ke Shih <pkshih@realtek.com>
      Cc: Yan-Hsuan Chuang <yhchuang@realtek.com>
      Cc: Birming Chiu <birming@realtek.com>
      Cc: Shaofu <shaofu@realtek.com>
      Cc: Steven Ting <steventing@realtek.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      271612d7
    • A
      brcmfmac: fix regression in brcmf_sdio_txpkt_hdalign() · 0a166282
      Arend Van Spriel 提交于
      Recent change in brcmf_sdio_txpkt_hdalign() changed the
      behavior and now always returns 0. This resulted in a
      regression which basically renders the device useless.
      
      Fixes: 270a6c1f ("brcmfmac: rework headroom check in .start_xmit()")
      Reported-by: NS. Gilles <sgilles@math.umd.edu>
      Tested-by: NS. Gilles <sgilles@math.umd.edu>
      Signed-off-by: NArend van Spriel <arend.vanspriel@broadcom.com>
      Signed-off-by: NKalle Valo <kvalo@codeaurora.org>
      0a166282
    • L
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net · 96080f69
      Linus Torvalds 提交于
      Pull networking fixes from David Miller:
      
       1) BPF verifier signed/unsigned value tracking fix, from Daniel
          Borkmann, Edward Cree, and Josef Bacik.
      
       2) Fix memory allocation length when setting up calls to
          ->ndo_set_mac_address, from Cong Wang.
      
       3) Add a new cxgb4 device ID, from Ganesh Goudar.
      
       4) Fix FIB refcount handling, we have to set it's initial value before
          the configure callback (which can bump it). From David Ahern.
      
       5) Fix double-free in qcom/emac driver, from Timur Tabi.
      
       6) A bunch of gcc-7 string format overflow warning fixes from Arnd
          Bergmann.
      
       7) Fix link level headroom tests in ip_do_fragment(), from Vasily
          Averin.
      
       8) Fix chunk walking in SCTP when iterating over error and parameter
          headers. From Alexander Potapenko.
      
       9) TCP BBR congestion control fixes from Neal Cardwell.
      
      10) Fix SKB fragment handling in bcmgenet driver, from Doug Berger.
      
      11) BPF_CGROUP_RUN_PROG_SOCK_OPS needs to check for null __sk, from Cong
          Wang.
      
      12) xmit_recursion in ppp driver needs to be per-device not per-cpu,
          from Gao Feng.
      
      13) Cannot release skb->dst in UDP if IP options processing needs it.
          From Paolo Abeni.
      
      14) Some netdev ioctl ifr_name[] NULL termination fixes. From Alexander
          Levin and myself.
      
      15) Revert some rtnetlink notification changes that are causing
          regressions, from David Ahern.
      
      * git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (83 commits)
        net: bonding: Fix transmit load balancing in balance-alb mode
        rds: Make sure updates to cp_send_gen can be observed
        net: ethernet: ti: cpsw: Push the request_irq function to the end of probe
        ipv4: initialize fib_trie prior to register_netdev_notifier call.
        rtnetlink: allocate more memory for dev_set_mac_address()
        net: dsa: b53: Add missing ARL entries for BCM53125
        bpf: more tests for mixed signed and unsigned bounds checks
        bpf: add test for mixed signed and unsigned bounds checks
        bpf: fix up test cases with mixed signed/unsigned bounds
        bpf: allow to specify log level and reduce it for test_verifier
        bpf: fix mixed signed/unsigned derived min/max value bounds
        ipv6: avoid overflow of offset in ip6_find_1stfragopt
        net: tehuti: don't process data if it has not been copied from userspace
        Revert "rtnetlink: Do not generate notifications for CHANGEADDR event"
        net: dsa: mv88e6xxx: Enable CMODE config support for 6390X
        dt-binding: ptp: Add SoC compatibility strings for dte ptp clock
        NET: dwmac: Make dwmac reset unconditional
        net: Zero terminate ifr_name in dev_ifname().
        wireless: wext: terminate ifr name coming from userspace
        netfilter: fix netfilter_net_init() return
        ...
      96080f69
    • K
      net: bonding: Fix transmit load balancing in balance-alb mode · cbf5ecb3
      Kosuke Tatsukawa 提交于
      balance-alb mode used to have transmit dynamic load balancing feature
      enabled by default.  However, transmit dynamic load balancing no longer
      works in balance-alb after commit 8b426dc5 ("bonding: remove
      hardcoded value").
      
      Both balance-tlb and balance-alb use the function bond_do_alb_xmit() to
      send packets.  This function uses the parameter tlb_dynamic_lb.
      tlb_dynamic_lb used to have the default value of 1 for balance-alb, but
      now the value is set to 0 except in balance-tlb.
      
      Re-enable transmit dyanmic load balancing by initializing tlb_dynamic_lb
      for balance-alb similar to balance-tlb.
      
      Fixes: 8b426dc5 ("bonding: remove hardcoded value")
      Signed-off-by: NKosuke Tatsukawa <tatsu@ab.jp.nec.com>
      Acked-by: NAndy Gospodarek <andy@greyhouse.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      cbf5ecb3
    • H
      rds: Make sure updates to cp_send_gen can be observed · e623a48e
      Håkon Bugge 提交于
      cp->cp_send_gen is treated as a normal variable, although it may be
      used by different threads.
      
      This is fixed by using {READ,WRITE}_ONCE when it is incremented and
      READ_ONCE when it is read outside the {acquire,release}_in_xmit
      protection.
      
      Normative reference from the Linux-Kernel Memory Model:
      
          Loads from and stores to shared (but non-atomic) variables should
          be protected with the READ_ONCE(), WRITE_ONCE(), and
          ACCESS_ONCE().
      
      Clause 5.1.2.4/25 in the C standard is also relevant.
      Signed-off-by: NHåkon Bugge <haakon.bugge@oracle.com>
      Reviewed-by: NKnut Omang <knut.omang@oracle.com>
      Acked-by: NSantosh Shilimkar <santosh.shilimkar@oracle.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e623a48e
    • K
      net: ethernet: ti: cpsw: Push the request_irq function to the end of probe · 070f9c65
      Keerthy 提交于
      Push the request_irq function to the end of probe so as
      to ensure all the required fields are populated in the event
      of an ISR getting executed right after requesting the irq.
      
      Currently while loading the crash kernel a crash was seen as
      soon as devm_request_threaded_irq was called. This was due to
      n->poll being NULL which is called as part of net_rx_action
      function.
      Suggested-by: NSekhar Nori <nsekhar@ti.com>
      Signed-off-by: NKeerthy <j-keerthy@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      070f9c65