diff --git a/kernel/bpf/inode.c b/kernel/bpf/inode.c index fb878ba3f22f030efbbc9e1f3949443f6ad53337..18f4969552ac2faa4ccf60071d48fb87189492ca 100644 --- a/kernel/bpf/inode.c +++ b/kernel/bpf/inode.c @@ -226,10 +226,12 @@ static void *map_seq_next(struct seq_file *m, void *v, loff_t *pos) else prev_key = key; + rcu_read_lock(); if (map->ops->map_get_next_key(map, prev_key, key)) { map_iter(m)->done = true; - return NULL; + key = NULL; } + rcu_read_unlock(); return key; }