Search Linux Wireless

Re: [PATCH] mac80211: don't sleep in mesh_path_add allocation

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

 



On Wed, 2009-07-15 at 11:02 -0700, Andrey Yurovsky wrote:
> mesh_path_add allocates an mpath and a node but it is called with RCU
> held.  Use the GFP_ATOMIC flag to prevent these allocations from
> sleeping since otherwise we can hit the following sleep-while-atomic:

This isn't sufficient, quoting from the function, highlight added:

int mesh_path_add(u8 *dst, struct ieee80211_sub_if_data *sdata)
{
...
        if (grow) {
                struct mesh_table *oldtbl, *newtbl;

                write_lock(&pathtbl_resize_lock);
                oldtbl = mesh_paths;
                newtbl = mesh_table_grow(mesh_paths);
                if (!newtbl) {
                        write_unlock(&pathtbl_resize_lock);
                        return 0;
                }
                rcu_assign_pointer(mesh_paths, newtbl);
                write_unlock(&pathtbl_resize_lock);

*******         synchronize_rcu();
                mesh_table_free(oldtbl, false);
        }
...
}

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