1. 17 8月, 2014 1 次提交
    • S
      batman-adv: Fix parameter order of hlist_add_behind · e050dbeb
      Sven Eckelmann 提交于
      1d023284 ("list: fix order of arguments for
      hlist_add_after(_rcu)") was incorrectly rebased on top of
      d9124268 ("batman-adv: Fix out-of-order
      fragmentation support"). The parameter order change of the rebased patch was
      not re-applied as expected. This causes a memory leak and can cause crashes
      when out-of-order packets are received. hlist_add_behind will try to access the
      uninitalized list pointers of frag_entry_new to find the previous/next entry
      and may modify/read random memory locations.
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      Cc: Andrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e050dbeb
  2. 07 8月, 2014 1 次提交
    • K
      list: fix order of arguments for hlist_add_after(_rcu) · 1d023284
      Ken Helias 提交于
      All other add functions for lists have the new item as first argument
      and the position where it is added as second argument.  This was changed
      for no good reason in this function and makes using it unnecessary
      confusing.
      
      The name was changed to hlist_add_behind() to cause unconverted code to
      generate a compile error instead of using the wrong parameter order.
      
      [akpm@linux-foundation.org: coding-style fixes]
      Signed-off-by: NKen Helias <kenhelias@firemail.de>
      Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
      Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>	[intel driver bits]
      Cc: Hugh Dickins <hughd@google.com>
      Cc: Christoph Hellwig <hch@infradead.org>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      1d023284
  3. 05 8月, 2014 1 次提交
    • S
      batman-adv: Fix out-of-order fragmentation support · d9124268
      Sven Eckelmann 提交于
      batadv_frag_insert_packet was unable to handle out-of-order packets because it
      dropped them directly. This is caused by the way the fragmentation lists is
      checked for the correct place to insert a fragmentation entry.
      
      The fragmentation code keeps the fragments in lists. The fragmentation entries
      are kept in descending order of sequence number. The list is traversed and each
      entry is compared with the new fragment. If the current entry has a smaller
      sequence number than the new fragment then the new one has to be inserted
      before the current entry. This ensures that the list is still in descending
      order.
      
      An out-of-order packet with a smaller sequence number than all entries in the
      list still has to be added to the end of the list. The used hlist has no
      information about the last entry in the list inside hlist_head and thus the
      last entry has to be calculated differently. Currently the code assumes that
      the iterator variable of hlist_for_each_entry can be used for this purpose
      after the hlist_for_each_entry finished. This is obviously wrong because the
      iterator variable is always NULL when the list was completely traversed.
      
      Instead the information about the last entry has to be stored in a different
      variable.
      
      This problem was introduced in 610bfc6b
      ("batman-adv: Receive fragmented packets and merge").
      Signed-off-by: NSven Eckelmann <sven@narfation.org>
      Signed-off-by: NMarek Lindner <mareklindner@neomailbox.ch>
      Signed-off-by: NAntonio Quartulli <antonio@meshcoding.com>
      d9124268
  4. 16 5月, 2014 1 次提交
  5. 22 3月, 2014 1 次提交
  6. 12 1月, 2014 1 次提交
  7. 09 1月, 2014 1 次提交
  8. 28 12月, 2013 1 次提交
  9. 12 10月, 2013 2 次提交