1. 13 4月, 2017 11 次提交
  2. 14 1月, 2017 1 次提交
    • P
      locking/atomic, kref: Add kref_read() · 2c935bc5
      Peter Zijlstra 提交于
      Since we need to change the implementation, stop exposing internals.
      
      Provide kref_read() to read the current reference count; typically
      used for debug messages.
      
      Kills two anti-patterns:
      
      	atomic_read(&kref->refcount)
      	kref->refcount.counter
      Signed-off-by: NPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
      Cc: Linus Torvalds <torvalds@linux-foundation.org>
      Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-kernel@vger.kernel.org
      Signed-off-by: NIngo Molnar <mingo@kernel.org>
      2c935bc5
  3. 23 11月, 2016 1 次提交
  4. 10 6月, 2016 1 次提交
  5. 08 6月, 2016 1 次提交
  6. 26 4月, 2016 1 次提交
    • G
      Bluetooth: 6lowpan: Fix memory corruption of ipv6 destination address · 55441070
      Glenn Ruben Bakke 提交于
      The memcpy of ipv6 header destination address to the skb control block
      (sbk->cb) in header_create() results in currupted memory when bt_xmit()
      is issued. The skb->cb is "released" in the return of header_create()
      making room for lower layer to minipulate the skb->cb.
      
      The value retrieved in bt_xmit is not persistent across header creation
      and sending, and the lower layer will overwrite portions of skb->cb,
      making the copied destination address wrong.
      
      The memory corruption will lead to non-working multicast as the first 4
      bytes of the copied destination address is replaced by a value that
      resolves into a non-multicast prefix.
      
      This fix removes the dependency on the skb control block between header
      creation and send, by moving the destination address memcpy to the send
      function path (setup_create, which is called from bt_xmit).
      Signed-off-by: NGlenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
      Acked-by: NJukka Rissanen <jukka.rissanen@linux.intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      Cc: stable@vger.kernel.org # 4.5+
      55441070
  7. 13 4月, 2016 1 次提交
    • A
      6lowpan: change naming for lowpan private data · 2e4d60cb
      Alexander Aring 提交于
      This patch changes the naming for interface private data for lowpan
      intefaces. The current private data scheme is:
      
      -------------------------------------------------
      |    6LoWPAN Generic   |    LinkLayer 6LoWPAN   |
      -------------------------------------------------
      
      the current naming schemes are:
      
      - 6LoWPAN Generic:
        - lowpan_priv
      - LinkLayer 6LoWPAN:
        - BTLE
          - lowpan_dev
        - 802.15.4:
          - lowpan_dev_info
      
      the new naming scheme with this patch will be:
      
      - 6LoWPAN Generic:
        - lowpan_dev
      - LinkLayer 6LoWPAN:
        - BTLE
          - lowpan_btle_dev
        - 802.15.4:
          - lowpan_802154_dev
      Signed-off-by: NAlexander Aring <aar@pengutronix.de>
      Reviewed-by: Stefan Schmidt<stefan@osg.samsung.com>
      Acked-by: NJukka Rissanen <jukka.rissanen@linux.intel.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      2e4d60cb
  8. 23 1月, 2016 2 次提交
    • L
      Bluetooth: 6lowpan: Fix handling of uncompressed IPv6 packets · 87f5fedb
      Lukasz Duda 提交于
      This patch fixes incorrect handling of the 6lowpan packets that contain
      uncompressed IPv6 header.
      
      RFC4944 specifies a special dispatch for 6lowpan to carry uncompressed
      IPv6 header. This dispatch (1 byte long) has to be removed during
      reception and skb data pointer has to be moved. To correctly point in
      the beginning of the IPv6 header the dispatch byte has to be pulled off
      before packet can be processed by netif_rx_in().
      
      Test scenario: IPv6 packets are not correctly interpreted by the network
      layer when IPv6 header is not compressed (e.g. ICMPv6 Echo Reply is not
      propagated correctly to the ICMPv6 layer because the extra byte will make
      the header look corrupted).
      
      Similar approach is done for IEEE 802.15.4.
      Signed-off-by: NLukasz Duda <lukasz.duda@nordicsemi.no>
      Signed-off-by: NGlenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
      Acked-by: NJukka Rissanen <jukka.rissanen@linux.intel.com>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Cc: stable@vger.kernel.org # 4.4+
      87f5fedb
    • G
      Bluetooth: 6lowpan: Fix kernel NULL pointer dereferences · 4c58f328
      Glenn Ruben Bakke 提交于
      The fixes provided in this patch assigns a valid net_device structure to
      skb before dispatching it for further processing.
      
      Scenario #1:
      ============
      
      Bluetooth 6lowpan receives an uncompressed IPv6 header, and dispatches it
      to netif. The following error occurs:
      
      Null pointer dereference error #1 crash log:
      
      [  845.854013] BUG: unable to handle kernel NULL pointer dereference at
                     0000000000000048
      [  845.855785] IP: [<ffffffff816e3d36>] enqueue_to_backlog+0x56/0x240
      ...
      [  845.909459] Call Trace:
      [  845.911678]  [<ffffffff816e3f64>] netif_rx_internal+0x44/0xf0
      
      The first modification fixes the NULL pointer dereference error by
      assigning dev to the local_skb in order to set a valid net_device before
      processing the skb by netif_rx_ni().
      
      Scenario #2:
      ============
      
      Bluetooth 6lowpan receives an UDP compressed message which needs further
      decompression by nhc_udp. The following error occurs:
      
      Null pointer dereference error #2 crash log:
      
      [   63.295149] BUG: unable to handle kernel NULL pointer dereference at
                     0000000000000840
      [   63.295931] IP: [<ffffffffc0559540>] udp_uncompress+0x320/0x626
                     [nhc_udp]
      
      The second modification fixes the NULL pointer dereference error by
      assigning dev to the local_skb in the case of a udp compressed packet.
      The 6lowpan udp_uncompress function expects that the net_device is set in
      the skb when checking lltype.
      Signed-off-by: NGlenn Ruben Bakke <glenn.ruben.bakke@nordicsemi.no>
      Signed-off-by: NLukasz Duda <lukasz.duda@nordicsemi.no>
      Acked-by: NJukka Rissanen <jukka.rissanen@linux.intel.com>
      Signed-off-by: NJohan Hedberg <johan.hedberg@intel.com>
      Cc: stable@vger.kernel.org # 4.4+
      4c58f328
  9. 10 12月, 2015 1 次提交
  10. 27 10月, 2015 1 次提交
  11. 22 10月, 2015 1 次提交
  12. 21 10月, 2015 3 次提交
  13. 08 10月, 2015 7 次提交
  14. 12 8月, 2015 2 次提交
  15. 30 7月, 2015 1 次提交
  16. 18 6月, 2015 5 次提交