]> git.baikalelectronics.ru Git - kernel.git/commit
batman-adv: Add inconsistent local TT netlink dump detection
authorSven Eckelmann <sven@narfation.org>
Tue, 30 Oct 2018 21:01:29 +0000 (22:01 +0100)
committerSimon Wunderlich <sw@simonwunderlich.de>
Mon, 12 Nov 2018 09:41:51 +0000 (10:41 +0100)
commit59e24dd382e180dc3445dbe3e82a43cad338e0ae
tree1ab43c822d119431d31af3ec45dc667335865fdf
parentb9a22e276e02db0f6f32b2e5fc8ead7f78f2bdd3
batman-adv: Add inconsistent local TT netlink dump detection

The netlink dump functionality transfers a large number of entries from the
kernel to userspace. It is rather likely that the transfer has to
interrupted and later continued. During that time, it can happen that
either new entries are added or removed. The userspace could than either
receive some entries multiple times or miss entries.

Commit 49781308500d ("netlink: advertise incomplete dumps") introduced a
mechanism to inform userspace about this problem. Userspace can then decide
whether it is necessary or not to retry dumping the information again.

The netlink dump functions have to be switched to exclusive locks to avoid
changes while the current message is prepared. The already existing
generation sequence counter from the hash helper can be used for this
simple hash.

Reported-by: Matthias Schiffer <mschiffer@universe-factory.net>
Signed-off-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <sw@simonwunderlich.de>
net/batman-adv/translation-table.c