[ovs-dev] [PATCH] datapath: Don't call genlmsg_reply() under rcu_read_lock().
jesse at nicira.com
Fri May 27 23:39:07 UTC 2011
On Fri, May 27, 2011 at 4:35 PM, Ben Pfaff <blp at nicira.com> wrote:
> On Fri, May 27, 2011 at 04:04:33PM -0700, Jesse Gross wrote:
>> genlmsg_reply() indirectly makes a call to kmalloc but takes no
>> GFP flags, instead using GFP_ATOMIC if in a softirq and GFP_KERNEL
>> otherwise. However, here we hold rcu_read_lock(), which requires
>> GFP_ATOMIC but is not a softirq. Since we've already built the
>> reply message, it is safe to release rcu_read_lock(), so do that
>> before calling genlmsg_reply().
>> Signed-off-by: Jesse Gross <jesse at nicira.com>
>> CC: Hao Zheng <hzheng at nicira.com>
> Makes sense.
> Acked-by: Ben Pfaff <blp at nicira.com>
More information about the dev