diff options
author | David S. Miller <davem@davemloft.net> | 2012-07-11 02:56:33 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-07-11 02:56:33 -0400 |
commit | 04c9f416e371cff076a8b3279fb213628915d059 (patch) | |
tree | 2b64cb835cbc9d19d2d06f1e7618615d40ada0af /net/ieee802154 | |
parent | c278fa53c123282f753b2264fc62c0e9502a32fa (diff) | |
parent | c1f5163de417dab01fa9daaf09a74bbb19303f3c (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Conflicts:
net/batman-adv/bridge_loop_avoidance.c
net/batman-adv/bridge_loop_avoidance.h
net/batman-adv/soft-interface.c
net/mac80211/mlme.c
With merge help from Antonio Quartulli (batman-adv) and
Stephen Rothwell (drivers/net/usb/qmi_wwan.c).
The net/mac80211/mlme.c conflict seemed easy enough, accounting for a
conversion to some new tracing macros.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ieee802154')
-rw-r--r-- | net/ieee802154/dgram.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net/ieee802154/dgram.c b/net/ieee802154/dgram.c index 6fbb2ad7bb6d..16705611589a 100644 --- a/net/ieee802154/dgram.c +++ b/net/ieee802154/dgram.c | |||
@@ -230,6 +230,12 @@ static int dgram_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
230 | mtu = dev->mtu; | 230 | mtu = dev->mtu; |
231 | pr_debug("name = %s, mtu = %u\n", dev->name, mtu); | 231 | pr_debug("name = %s, mtu = %u\n", dev->name, mtu); |
232 | 232 | ||
233 | if (size > mtu) { | ||
234 | pr_debug("size = %Zu, mtu = %u\n", size, mtu); | ||
235 | err = -EINVAL; | ||
236 | goto out_dev; | ||
237 | } | ||
238 | |||
233 | hlen = LL_RESERVED_SPACE(dev); | 239 | hlen = LL_RESERVED_SPACE(dev); |
234 | tlen = dev->needed_tailroom; | 240 | tlen = dev->needed_tailroom; |
235 | skb = sock_alloc_send_skb(sk, hlen + tlen + size, | 241 | skb = sock_alloc_send_skb(sk, hlen + tlen + size, |
@@ -258,12 +264,6 @@ static int dgram_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
258 | if (err < 0) | 264 | if (err < 0) |
259 | goto out_skb; | 265 | goto out_skb; |
260 | 266 | ||
261 | if (size > mtu) { | ||
262 | pr_debug("size = %Zu, mtu = %u\n", size, mtu); | ||
263 | err = -EINVAL; | ||
264 | goto out_skb; | ||
265 | } | ||
266 | |||
267 | skb->dev = dev; | 267 | skb->dev = dev; |
268 | skb->sk = sk; | 268 | skb->sk = sk; |
269 | skb->protocol = htons(ETH_P_IEEE802154); | 269 | skb->protocol = htons(ETH_P_IEEE802154); |