We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0647169 commit 930651aCopy full SHA for 930651a
kernel/bpf/syscall.c
@@ -186,15 +186,17 @@ static int bpf_map_alloc_id(struct bpf_map *map)
186
187
static void bpf_map_free_id(struct bpf_map *map, bool do_idr_lock)
188
{
189
+ unsigned long flags;
190
+
191
if (do_idr_lock)
- spin_lock_bh(&map_idr_lock);
192
+ spin_lock_irqsave(&map_idr_lock, flags);
193
else
194
__acquire(&map_idr_lock);
195
196
idr_remove(&map_idr, map->id);
197
198
- spin_unlock_bh(&map_idr_lock);
199
+ spin_unlock_irqrestore(&map_idr_lock, flags);
200
201
__release(&map_idr_lock);
202
}
0 commit comments