public inbox for kernel-janitors@vger.kernel.org
 help / color / mirror / Atom feed
From: Michal Hocko <mhocko@suse.cz>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Nathan Fontenot <nfont@austin.ibm.com>,
	linux-kernel@vger.kernel.org, Greg Kroah-Hartman <gregkh@suse.de>,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] memory hotplug: release lock on an error path
Date: Tue, 18 Oct 2011 21:29:32 +0000	[thread overview]
Message-ID: <20111018212931.GB10656@tiehlicka.suse.cz> (raw)
In-Reply-To: <20111005055326.GA32187@elgon.mountain>

On Wed 05-10-11 08:53:26, Dan Carpenter wrote:
> We need to release the mutex here before returning.

Which kernel have you used as a base? I do not see any code like that in
the vanilla kernel. And git log doesn't know anything about
check_page_reservations in the file as well...

> 
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> 
> diff --git a/drivers/base/memory.c b/drivers/base/memory.c
> index ca8bfe5..164c8a2 100644
> --- a/drivers/base/memory.c
> +++ b/drivers/base/memory.c
> @@ -299,7 +299,7 @@ static int memory_block_change_state(struct memory_block *mem,
>  		for (i = 0; i < sections_per_block; i++) {
>  			ret = check_page_reservations(mem->start_section_nr + i);
>  			if (ret)
> -				return ret;
> +				goto out;
>  		}
>  	}
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at  http://www.tux.org/lkml/

-- 
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic

  reply	other threads:[~2011-10-18 21:29 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-05  5:53 [patch] memory hotplug: release lock on an error path Dan Carpenter
2011-10-18 21:29 ` Michal Hocko [this message]
2011-10-18 22:28   ` Dan Carpenter
2011-10-20  0:20     ` Michal Hocko

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=20111018212931.GB10656@tiehlicka.suse.cz \
    --to=mhocko@suse.cz \
    --cc=dan.carpenter@oracle.com \
    --cc=gregkh@suse.de \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfont@austin.ibm.com \
    /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