linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: Dan Carpenter <error27@gmail.com>
Cc: James Bottomley <James.Bottomley@suse.de>,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
	linux-scsi@vger.kernel.org
Subject: Re: [patch 2/2] [SCSI] target: unlock on error path in configfs
Date: Tue, 04 Jan 2011 15:40:37 -0800	[thread overview]
Message-ID: <1294184437.29002.24.camel@haakon2.linux-iscsi.org> (raw)
In-Reply-To: <20110103055920.GV1886@bicker>

On Mon, 2011-01-03 at 08:59 +0300, Dan Carpenter wrote:
> If the user wrote a wrong value to the file the it would lead to a dead
> lock eventually.
> 

Good catch on this one.  Commited as 827447968 and pushed into
lio-core-2.6.git.

Thanks!

--nab

> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
> index d7b977d..2764510 100644
> --- a/drivers/target/target_core_configfs.c
> +++ b/drivers/target/target_core_configfs.c
> @@ -660,6 +660,7 @@ static ssize_t target_core_dev_store_attr_##_name(			\
>  	}								\
>  	ret = strict_strtoul(page, 0, &val);				\
>  	if (ret < 0) {							\
> +		spin_unlock(&se_dev->se_dev_lock);                      \
>  		printk(KERN_ERR "strict_strtoul() failed with"		\
>  			" ret: %d\n", ret);				\
>  		return -EINVAL;						\

      reply	other threads:[~2011-01-04 23:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-03  5:59 [patch 2/2] [SCSI] target: unlock on error path in configfs Dan Carpenter
2011-01-04 23:40 ` Nicholas A. Bellinger [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=1294184437.29002.24.camel@haakon2.linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=James.Bottomley@suse.de \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@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;
as well as URLs for NNTP newsgroup(s).