From: Dan Carpenter <dan.carpenter@oracle.com>
To: kernel-janitors@vger.kernel.org
Subject: re: net: Add GRO support for UDP encapsulating protocols
Date: Thu, 23 Jan 2014 16:10:59 +0000 [thread overview]
Message-ID: <20140123161059.GA29227@elgon.mountain> (raw)
Hello Or Gerlitz,
The patch b582ef0990d4: "net: Add GRO support for UDP encapsulating
protocols" from Jan 20, 2014, leads to the following static checker
warning:
net/ipv4/udp_offload.c:104 udp_add_offload()
error: scheduling with locks held: 'spin_lock:sock_lock'"
net/ipv4/udp_offload.c
101 int udp_add_offload(struct udp_offload *uo)
102 {
103 struct udp_offload_priv **head = &udp_offload_base;
104 struct udp_offload_priv *new_offload = kzalloc(sizeof(*new_offload), GFP_KERNEL);
^^^^^^^^^^
Should be GFP_ATOMIC?
105
106 if (!new_offload)
107 return -ENOMEM;
108
109 new_offload->offload = uo;
110
111 spin_lock(&udp_offload_lock);
112 rcu_assign_pointer(new_offload->next, rcu_dereference(*head));
113 rcu_assign_pointer(*head, rcu_dereference(new_offload));
114 spin_unlock(&udp_offload_lock);
115
116 return 0;
117 }
The call tree looks like:
vxlan_socket_create() <-- holds the spinlock
-> vxlan_notify_add_rx_port()
-> udp_add_offload() <-- shedules
regards,
dan carpenter
reply other threads:[~2014-01-23 16:10 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140123161059.GA29227@elgon.mountain \
--to=dan.carpenter@oracle.com \
--cc=kernel-janitors@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox