20 Oct, 2018
1 commit
-
[ Upstream commit ae3cdc97dc10c7a3b31f297dab429bfb774c9ccb ]
The function batadv_tvlv_handler_register is responsible for adding new
tvlv_handler to the handler_list. It first checks whether the entry
already is in the list or not. If it is, then the creation of a new entry
is aborted.But the lock for the list is only held when the list is really modified.
This could lead to duplicated entries because another context could create
an entry with the same key between the check and the list manipulation.The check and the manipulation of the list must therefore be in the same
locked code section.Fixes: ef26157747d4 ("batman-adv: tvlv - basic infrastructure")
Signed-off-by: Sven Eckelmann
Signed-off-by: Simon Wunderlich
Signed-off-by: Sasha Levin
Signed-off-by: Greg Kroah-Hartman
26 Jan, 2017
1 commit
-
Signed-off-by: Sven Eckelmann
Signed-off-by: Simon Wunderlich
30 Oct, 2016
1 commit
-
Sending functions in Linux consume the supplied skbuff. Doing the same in
batadv_send_skb_to_orig avoids the hack of returning -1 (-EPERM) to signal
the caller that he is responsible for cleaning up the skb.Signed-off-by: Sven Eckelmann
Signed-off-by: Simon Wunderlich
09 Aug, 2016
2 commits
-
It is hard to understand why the refcnt is increased when it isn't done
near the actual place the new reference is used. So using kref_get right
before the place which requires the reference and in the same function
helps to avoid accidental problems caused by incorrect reference counting.Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich -
It is hard to understand why the refcnt is increased when it isn't done
near the actual place the new reference is used. So using kref_get right
before the place which requires the reference and in the same function
helps to avoid accidental problems caused by incorrect reference counting.Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich
04 Jul, 2016
1 commit
-
Return the proper netdev TX status along the TX path so that the tp_meter
can understand when the queue is full and should stop sending packets.Signed-off-by: Antonio Quartulli
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich
30 Jun, 2016
1 commit
-
The tvlv functionality in main.c is mostly unrelated to the rest of the
content. It still takes up a large portion of this source file (~45%, 588
lines). Moving it to a separate file makes it better visible as a main
component of the batman-adv implementation and hides it less in the other
helper functions in main.cSigned-off-by: Markus Pargmann
[sven@narfation.org: fix conflicts with current version, fix includes,
rewrote commit message]
Signed-off-by: Sven Eckelmann
Signed-off-by: Marek Lindner
Signed-off-by: Simon Wunderlich