Messages in this thread | | | Subject | Re: [PATCH] de-semaphorize smackfs | From | Daniel Walker <> | Date | Tue, 18 Mar 2008 08:41:39 -0700 |
| |
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
| |