Skip to contentSkip to conversation

memory hotplug: release lock on an error path

PATCH In review Dan Carpenter 2 participants 4 messages Oct 5, 2011 – Oct 20, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 memory hotplug: release lock on an error path

We need to release the mutex here before returning.

drivers/base/memory.c +1 -1
index ca8bfe5..164c8a2 100644
@@ -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;
 		}
 	}
 
#1 lore raw
Quoted 1 line · Dan Carpenter

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...

Quoted 21 lines
drivers/base/memory.c +1 -2
index ca8bfe5..164c8a2 100644
@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 6 lines
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic
#2 lore raw
Quoted 7 lines · Michal Hocko
Quoted 1 line · Dan Carpenter

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

#3 lore raw
Quoted 10 lines · Dan Carpenter
Quoted 7 lines · Michal Hocko
Quoted 1 line · Dan Carpenter

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.

Quoted 4 lines

regards,
dan carpenter

Thanks

Signature · 6 lines
Michal Hocko
SUSE Labs
SUSE LINUX s.r.o.
Lihovarska 1060/12
190 00 Praha 9    
Czech Republic