mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Daniel Walker <dwalker@mvista.com>
To: Jonathan Corbet <corbet@lwn.net>
Cc: linux-kernel@vger.kernel.org, Casey Schaufler <casey@schaufler-ca.com>
Subject: Re: [PATCH] de-semaphorize smackfs
Date: Tue, 18 Mar 2008 08:41:39 -0700	[thread overview]
Message-ID: <1205854899.10894.134.camel@localhost.localdomain> (raw)
In-Reply-To: <30338.1205795680@vena.lwn.net>


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


      parent reply	other threads:[~2008-03-19 19:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-17 23:14 Jonathan Corbet
2008-03-18  7:35 ` Christoph Hellwig
2008-03-18 12:01   ` Ahmed S. Darwish
2008-03-18 15:41 ` Daniel Walker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1205854899.10894.134.camel@localhost.localdomain \
    --to=dwalker@mvista.com \
    --cc=casey@schaufler-ca.com \
    --cc=corbet@lwn.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®