lkml.org 
[lkml]   [2008]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] de-semaphorize smackfs
From
Date

On Mon, 2008-03-17 at 17:14 -0600, Jonathan Corbet wrote:

> @@ -171,7 +171,7 @@ static int smk_open_load(struct inode *inode, struct file *file)
> if ((file->f_flags & O_ACCMODE) == O_RDONLY)
> return seq_open(file, &load_seq_ops);
>
> - if (down_interruptible(&smack_write_sem))
> + if (mutex_lock_interruptible(&smack_write_mutex))
> return -ERESTARTSYS;
>
> return 0;

There's a disconnect between the lock unlock calls, when the locking
application returns to userspace. Mutex's have a restriction that you
can't return to userspace while holding the lock.

Daniel



\
 
 \ /
  Last update: 2008-03-19 20:35    [W:0.169 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site