From: Arnd Bergmann Date: Tue, 20 May 2008 17:15:30 +0000 (+0200) Subject: agp-frontend: BKL pushdown X-Git-Tag: v2.6.27-rc1~1103^2~82 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a076230134f3083a58cef99e48b127818ef01e7a;p=linux-2.6 agp-frontend: BKL pushdown Signed-off-by: Arnd Bergmann --- diff --git a/drivers/char/agp/frontend.c b/drivers/char/agp/frontend.c index 857b26227d..963eff28fa 100644 --- a/drivers/char/agp/frontend.c +++ b/drivers/char/agp/frontend.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include "agp.h" @@ -677,6 +678,7 @@ static int agp_open(struct inode *inode, struct file *file) struct agp_client *client; int rc = -ENXIO; + lock_kernel(); mutex_lock(&(agp_fe.agp_mutex)); if (minor != AGPGART_MINOR) @@ -703,12 +705,14 @@ static int agp_open(struct inode *inode, struct file *file) agp_insert_file_private(priv); DBG("private=%p, client=%p", priv, client); mutex_unlock(&(agp_fe.agp_mutex)); + unlock_kernel(); return 0; err_out_nomem: rc = -ENOMEM; err_out: mutex_unlock(&(agp_fe.agp_mutex)); + unlock_kernel(); return rc; }