* [patch] memory hotplug: release lock on an error path
@ 2011-10-05 5:53 Dan Carpenter
2011-10-18 21:29 ` Michal Hocko
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2011-10-05 5:53 UTC (permalink / raw)
To: Nathan Fontenot; +Cc: linux-kernel, Greg Kroah-Hartman, kernel-janitors
We need to release the mutex here before returning.
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;
}
}
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [patch] memory hotplug: release lock on an error path
2011-10-05 5:53 [patch] memory hotplug: release lock on an error path Dan Carpenter
@ 2011-10-18 21:29 ` Michal Hocko
2011-10-18 22:28 ` Dan Carpenter
0 siblings, 1 reply; 4+ messages in thread
From: Michal Hocko @ 2011-10-18 21:29 UTC (permalink / raw)
To: Dan Carpenter
Cc: Nathan Fontenot, linux-kernel, Greg Kroah-Hartman,
kernel-janitors
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
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [patch] memory hotplug: release lock on an error path
2011-10-18 21:29 ` Michal Hocko
@ 2011-10-18 22:28 ` Dan Carpenter
2011-10-20 0:20 ` Michal Hocko
0 siblings, 1 reply; 4+ messages in thread
From: Dan Carpenter @ 2011-10-18 22:28 UTC (permalink / raw)
To: Michal Hocko
Cc: Nathan Fontenot, linux-kernel, Greg Kroah-Hartman,
kernel-janitors
On Tue, Oct 18, 2011 at 02:29:32PM -0700, Michal Hocko wrote:
> 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...
>
Sorry this was against linux-next.
regards,
dan carpenter
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [patch] memory hotplug: release lock on an error path
2011-10-18 22:28 ` Dan Carpenter
@ 2011-10-20 0:20 ` Michal Hocko
0 siblings, 0 replies; 4+ messages in thread
From: Michal Hocko @ 2011-10-20 0:20 UTC (permalink / raw)
To: Dan Carpenter
Cc: Nathan Fontenot, linux-kernel, Greg Kroah-Hartman,
kernel-janitors
On Wed 19-10-11 01:28:05, Dan Carpenter wrote:
> On Tue, Oct 18, 2011 at 02:29:32PM -0700, Michal Hocko wrote:
> > 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...
> >
>
> Sorry this was against linux-next.
Would be good to mention which patch introduces this in the patch
description.
>
> regards,
> dan carpenter
>
Thanks
--
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9
Czech Republic
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-10-20 0:20 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-05 5:53 [patch] memory hotplug: release lock on an error path Dan Carpenter
2011-10-18 21:29 ` Michal Hocko
2011-10-18 22:28 ` Dan Carpenter
2011-10-20 0:20 ` Michal Hocko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox