Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100327
b: refs/heads/master
c: a076230
h: refs/heads/master
i:
  100325: 8f6e9e9
  100323: 5820b60
  100319: ecf9cbe
v: v3
  • Loading branch information
Arnd Bergmann authored and Jonathan Corbet committed Jun 20, 2008
1 parent 80dfdc2 commit 8312038
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8f5934278d1d86590244c2791b28f77d67466007
refs/heads/master: a076230134f3083a58cef99e48b127818ef01e7a
4 changes: 4 additions & 0 deletions trunk/drivers/char/agp/frontend.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
#include <linux/mm.h>
#include <linux/fs.h>
#include <linux/sched.h>
#include <linux/smp_lock.h>
#include <asm/uaccess.h>
#include <asm/pgtable.h>
#include "agp.h"
Expand Down Expand Up @@ -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)
Expand All @@ -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;
}

Expand Down

0 comments on commit 8312038

Please sign in to comment.