1. 30 7月, 2015 3 次提交
  2. 23 7月, 2015 6 次提交
  3. 05 7月, 2015 1 次提交
    • L
      bluetooth: fix list handling · 9b284cbd
      Linus Torvalds 提交于
      Commit 835a6a2f ("Bluetooth: Stop sabotaging list poisoning")
      thought that the code was sabotaging the list poisoning when NULL'ing
      out the list pointers and removed it.
      
      But what was going on was that the bluetooth code was using NULL
      pointers for the list as a way to mark it empty, and that commit just
      broke it (and replaced the test with NULL with a "list_empty()" test on
      a uninitialized list instead, breaking things even further).
      
      So fix it all up to use the regular and real list_empty() handling
      (which does not use NULL, but a pointer to itself), also making sure to
      initialize the list properly (the previous NULL case was initialized
      implicitly by the session being allocated with kzalloc())
      
      This is a combination of patches by Marcel Holtmann and Tedd Ho-Jeong
      An.
      
      [ I would normally expect to get this through the bt tree, but I'm going
        to release -rc1, so I'm just committing this directly   - Linus ]
      Reported-and-tested-by: NJörg Otte <jrg.otte@gmail.com>
      Cc: Alexey Dobriyan <adobriyan@gmail.com>
      Original-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Original-by: Marcel Holtmann <marcel@holtmann.org>:
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      9b284cbd
  4. 01 7月, 2015 1 次提交
    • T
      Bluetooth: Reinitialize the list after deletion for session user list · ab944c83
      Tedd Ho-Jeong An 提交于
      If the user->list is deleted with list_del(), it doesn't initialize the
      entry which can cause the issue with list_empty(). According to the
      comment from the list.h, list_empty() returns false even if the list is
      empty and put the entry in an undefined state.
      
      /**
       * list_del - deletes entry from list.
       * @entry: the element to delete from the list.
       * Note: list_empty() on entry does not return true after this, the entry is
       * in an undefined state.
       */
      
      Because of this behavior, list_empty() returns false even if list is empty
      when the device is reconnected.
      
      So, user->list needs to be re-initialized after list_del(). list.h already
      have a macro list_del_init() which deletes the entry and initailze it again.
      Signed-off-by: NTedd Ho-Jeong An <tedd.an@intel.com>
      Tested-by: NJörg Otte <jrg.otte@gmail.com>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      ab944c83
  5. 27 6月, 2015 1 次提交
  6. 19 6月, 2015 22 次提交
  7. 18 6月, 2015 5 次提交
  8. 12 6月, 2015 1 次提交