https://github.com/torvalds/linux
Revision 690bb6fb64f5dc7437317153902573ecad67593d authored by Sven Eckelmann on 27 February 2022, 23:01:24 UTC, committed by Simon Wunderlich on 02 March 2022, 08:01:25 UTC
There is no need to call dev_get_iflink multiple times for the same
net_device in batadv_is_on_batman_iface. And since some of the
.ndo_get_iflink callbacks are dynamic (for example via RCUs like in
vxcan_get_iflink), it could easily happen that the returned values are not
stable. The pre-checks before __dev_get_by_index are then of course bogus.

Fixes: b7eddd0b3950 ("batman-adv: prevent using any virtual device created on batman-adv as hard-interface")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
1 parent e783362
History
Tip revision: 690bb6fb64f5dc7437317153902573ecad67593d authored by Sven Eckelmann on 27 February 2022, 23:01:24 UTC
batman-adv: Request iflink once in batadv-on-batadv check
Tip revision: 690bb6f
File Mode Size
Documentation
LICENSES
arch
block
certs
crypto
drivers
fs
include
init
ipc
kernel
lib
mm
net
samples
scripts
security
sound
tools
usr
virt
.clang-format -rw-r--r-- 16.6 KB
.cocciconfig -rw-r--r-- 59 bytes
.get_maintainer.ignore -rw-r--r-- 71 bytes
.gitattributes -rw-r--r-- 62 bytes
.gitignore -rw-r--r-- 1.9 KB
.mailmap -rw-r--r-- 21.2 KB
COPYING -rw-r--r-- 496 bytes
CREDITS -rw-r--r-- 98.8 KB
Kbuild -rw-r--r-- 1.3 KB
Kconfig -rw-r--r-- 555 bytes
MAINTAINERS -rw-r--r-- 625.5 KB
Makefile -rw-r--r-- 63.5 KB
README -rw-r--r-- 727 bytes

README

back to top