Search Linux Wireless

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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> 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

Attachment: signature.asc
Description: This is a digitally signed message part


[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux