]> git.baikalelectronics.ru Git - kernel.git/commit
net/ipv4: Use non-atomic allocation of udp offloads structure instance
authorOr Gerlitz <ogerlitz@mellanox.com>
Wed, 29 Jan 2014 16:08:59 +0000 (18:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 Jan 2014 00:25:48 +0000 (16:25 -0800)
commit07e4ef1b4fee4c02e8fec41833803aa7fc3869df
treec07e22943f2c0a05c3cde04f162b9b32cf95200f
parent705a89c20a4d6335d6e0f5732e4b43474e4b9bae
net/ipv4: Use non-atomic allocation of udp offloads structure instance

Since udp_add_offload() can be called from non-sleepable context e.g
under this call tree from the vxlan driver use case:

  vxlan_socket_create() <-- holds the spinlock
  -> vxlan_notify_add_rx_port()
     -> udp_add_offload()  <-- schedules

we should allocate the udp_offloads structure in atomic manner.

Fixes: d5d23ea ('net: Add GRO support for UDP encapsulating protocols')
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/udp_offload.c