aboutsummaryrefslogtreecommitdiff
path: root/kernel/bpf/syscall.c
diff options
context:
space:
mode:
authorAndy Shevchenko2017-11-03 13:50:41 +0200
committerAndy Shevchenko2017-11-03 13:50:41 +0200
commit7d9a6ef558f6ff375aab9e29f08124cb0daa9bc5 (patch)
tree3916e6cf9678a41081ae822ef67ec5cae1c1fffa /kernel/bpf/syscall.c
parent3fcf2b2a2529e268c537d8ad9dac5987ebc8a2f7 (diff)
parent0224d45c9d46401b6d7018a96cfe049c5da7d91c (diff)
Merge branch 'i2c/cht-wc-fusb302-immutable' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux
Pull i2c/cht-wc-fusb302-immutable immutable branch from Wolfram Sang: as discussed before, here is the immutable branch for the i2c-cht-wc driver, so you can safely apply Hans' patch [1] "platform/x86: intel_cht_int33fe: Update fusb302 type string, add properties" on top of this. [1] http://patchwork.ozlabs.org/patch/824314/
Diffstat (limited to 'kernel/bpf/syscall.c')
-rw-r--r--kernel/bpf/syscall.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/bpf/syscall.c b/kernel/bpf/syscall.c
index cb17e1cd1d43..25d074920a00 100644
--- a/kernel/bpf/syscall.c
+++ b/kernel/bpf/syscall.c
@@ -186,15 +186,17 @@ static int bpf_map_alloc_id(struct bpf_map *map)
static void bpf_map_free_id(struct bpf_map *map, bool do_idr_lock)
{
+ unsigned long flags;
+
if (do_idr_lock)
- spin_lock_bh(&map_idr_lock);
+ spin_lock_irqsave(&map_idr_lock, flags);
else
__acquire(&map_idr_lock);
idr_remove(&map_idr, map->id);
if (do_idr_lock)
- spin_unlock_bh(&map_idr_lock);
+ spin_unlock_irqrestore(&map_idr_lock, flags);
else
__release(&map_idr_lock);
}