diff options
| author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-26 22:00:52 -0400 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-05-26 22:00:52 -0400 |
| commit | 45f6bc5ff9c3387387f048ec85dcb4e69acf0b03 (patch) | |
| tree | d04952bb05b53a362bcd165fb910c5c1441b4c5d /net/batman-adv/network-coding.c | |
| parent | 3138887bd8d18173f3c2baf1e43621c49090cd27 (diff) | |
| parent | e4aa937ec75df0eea0bee03bffa3303ad36c986b (diff) | |
Merge 3.10-rc3 into usb-next
We want these fixes.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'net/batman-adv/network-coding.c')
| -rw-r--r-- | net/batman-adv/network-coding.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/net/batman-adv/network-coding.c b/net/batman-adv/network-coding.c index f7c54305a918..e84629ece9b7 100644 --- a/net/batman-adv/network-coding.c +++ b/net/batman-adv/network-coding.c | |||
| @@ -1514,6 +1514,7 @@ batadv_nc_skb_decode_packet(struct batadv_priv *bat_priv, struct sk_buff *skb, | |||
| 1514 | struct ethhdr *ethhdr, ethhdr_tmp; | 1514 | struct ethhdr *ethhdr, ethhdr_tmp; |
| 1515 | uint8_t *orig_dest, ttl, ttvn; | 1515 | uint8_t *orig_dest, ttl, ttvn; |
| 1516 | unsigned int coding_len; | 1516 | unsigned int coding_len; |
| 1517 | int err; | ||
| 1517 | 1518 | ||
| 1518 | /* Save headers temporarily */ | 1519 | /* Save headers temporarily */ |
| 1519 | memcpy(&coded_packet_tmp, skb->data, sizeof(coded_packet_tmp)); | 1520 | memcpy(&coded_packet_tmp, skb->data, sizeof(coded_packet_tmp)); |
| @@ -1568,8 +1569,11 @@ batadv_nc_skb_decode_packet(struct batadv_priv *bat_priv, struct sk_buff *skb, | |||
| 1568 | coding_len); | 1569 | coding_len); |
| 1569 | 1570 | ||
| 1570 | /* Resize decoded skb if decoded with larger packet */ | 1571 | /* Resize decoded skb if decoded with larger packet */ |
| 1571 | if (nc_packet->skb->len > coding_len + h_size) | 1572 | if (nc_packet->skb->len > coding_len + h_size) { |
| 1572 | pskb_trim_rcsum(skb, coding_len + h_size); | 1573 | err = pskb_trim_rcsum(skb, coding_len + h_size); |
| 1574 | if (err) | ||
| 1575 | return NULL; | ||
| 1576 | } | ||
| 1573 | 1577 | ||
| 1574 | /* Create decoded unicast packet */ | 1578 | /* Create decoded unicast packet */ |
| 1575 | unicast_packet = (struct batadv_unicast_packet *)skb->data; | 1579 | unicast_packet = (struct batadv_unicast_packet *)skb->data; |
