]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Fix parameter order of hlist_add_behind
authorSven Eckelmann <sven@narfation.org>
Fri, 15 Aug 2014 08:19:39 +0000 (10:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 17 Aug 2014 02:19:08 +0000 (19:19 -0700)
commite64aec47af54a10b46bb47c5a15ddcc03c39290a
treeca105c43b61e75c6838003abbbdd822e037b19c7
parent31ceb5a154f9430a9e8c4edac46617c82f3121ad
batman-adv: Fix parameter order of hlist_add_behind

60f715472e91e9f614fb9ca1c011eaea65f77fe3 ("list: fix order of arguments for
hlist_add_after(_rcu)") was incorrectly rebased on top of
c768d1587dd00e7599f9ea4b40c71cb581b5fc8a ("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: Sven Eckelmann <sven@narfation.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/batman-adv/fragmentation.c