Thread (1 message) 1 message, 1 author, 2008-05-06

Re: [PATCH 1/4][MAC80211]: Fix GFP_KERNEL allocation under read lock.

From: Johannes Berg <hidden>
Date: 2008-05-06 21:12:00
Also in: linux-wireless

What about doing both allocations in succession to local variables,
share the failure path if an error occours an kfree them unconditionally 
like this?

new_node = kmalloc(sizeof(struct mpath_node), GFP_KERNEL);
new_mpath = kzalloc(sizeof(struct mesh_path), GFP_KERNEL);
If the system is under enough pressure to fail the first allocation, do
we really want to try another one just to free things again right away?
I'm with Pavel here, let's rather clean up the failure code path.

johannes

Attachments

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help