From 4a23b4696e1551914aec7ac8866e63eae1789402 Mon Sep 17 00:00:00 2001 From: Arnd Bergmann Date: Tue, 20 May 2008 19:15:33 +0200 Subject: [PATCH] --- yaml --- r: 100329 b: refs/heads/master c: 2861ead38b8a376888c3f63b9c8e45d4cee02117 h: refs/heads/master i: 100327: 83120384189fbfbd1a3db6e84f2d712b784746ba v: v3 --- [refs] | 2 +- trunk/drivers/char/apm-emulation.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index fa21413dea8e..b65e71d0859d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b82829943c470e59cfd3ee84d8ed6ae5d5e1a55b +refs/heads/master: 2861ead38b8a376888c3f63b9c8e45d4cee02117 diff --git a/trunk/drivers/char/apm-emulation.c b/trunk/drivers/char/apm-emulation.c index cdd876dbb2b0..da8a1658a273 100644 --- a/trunk/drivers/char/apm-emulation.c +++ b/trunk/drivers/char/apm-emulation.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -416,6 +417,7 @@ static int apm_open(struct inode * inode, struct file * filp) { struct apm_user *as; + lock_kernel(); as = kzalloc(sizeof(*as), GFP_KERNEL); if (as) { /* @@ -435,6 +437,7 @@ static int apm_open(struct inode * inode, struct file * filp) filp->private_data = as; } + unlock_kernel(); return as ? 0 : -ENOMEM; }