summaryrefslogtreecommitdiff
path: root/net/batman-adv/fragmentation.c
diff options
context:
space:
mode:
authorSven Eckelmann <sven@narfation.org>2015-06-21 15:45:15 +0300
committerAntonio Quartulli <antonio@meshcoding.com>2015-08-25 01:12:23 +0300
commit5274cd68d744b4bc59b32d87cbde70803130eb3f (patch)
treea1aa428cb74eb8cc022f60f5043e9099a67a7607 /net/batman-adv/fragmentation.c
parent2c72d655b04450056566bcbfe89c2427376b60b4 (diff)
downloadlinux-5274cd68d744b4bc59b32d87cbde70803130eb3f.tar.xz
batman-adv: Add lockdep_asserts for documented external locks
Some functions already have documentation about locks they require inside their kerneldoc header. These can be directly tested during runtime using the lockdep asserts. Signed-off-by: Sven Eckelmann <sven@narfation.org> Signed-off-by: Marek Lindner <mareklindner@neomailbox.ch> Signed-off-by: Antonio Quartulli <antonio@meshcoding.com>
Diffstat (limited to 'net/batman-adv/fragmentation.c')
-rw-r--r--net/batman-adv/fragmentation.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/batman-adv/fragmentation.c b/net/batman-adv/fragmentation.c
index ec5f7bcad66e..700c96c82a15 100644
--- a/net/batman-adv/fragmentation.c
+++ b/net/batman-adv/fragmentation.c
@@ -25,6 +25,7 @@
#include <linux/if_ether.h>
#include <linux/jiffies.h>
#include <linux/kernel.h>
+#include <linux/lockdep.h>
#include <linux/netdevice.h>
#include <linux/pkt_sched.h>
#include <linux/skbuff.h>
@@ -112,6 +113,8 @@ static int batadv_frag_size_limit(void)
static bool batadv_frag_init_chain(struct batadv_frag_table_entry *chain,
u16 seqno)
{
+ lockdep_assert_held(&chain->lock);
+
if (chain->seqno == seqno)
return false;