projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21dcda6
)
cdc-phonet: fix skb truesize underestimation
author
Eric Dumazet
<
[email protected]
>
Tue, 27 Mar 2012 03:17:26 +0000
(
03:17
+0000)
committer
David S. Miller
<
[email protected]
>
Wed, 28 Mar 2012 02:50:55 +0000
(22:50 -0400)
Now skb_add_rx_frag() has a truesize parameter, we can fix cdc-phonet to
properly account truesize of each fragment : a full page.
Signed-off-by: Eric Dumazet <
[email protected]
>
Cc: Felipe Balbi <
[email protected]
>
Cc: Greg Kroah-Hartman <
[email protected]
>
Cc: Rémi Denis-Courmont <
[email protected]
>
Acked-by: Rémi Denis-Courmont <
[email protected]
>
Signed-off-by: David S. Miller <
[email protected]
>
drivers/net/usb/cdc-phonet.c
patch
|
blob
|
history
diff --git
a/drivers/net/usb/cdc-phonet.c
b/drivers/net/usb/cdc-phonet.c
index 3886b30ed37355394e6155f60bb7e559e598391e..3e41b00c6806c6b88020a0a441aee979d5c21637 100644
(file)
--- a/
drivers/net/usb/cdc-phonet.c
+++ b/
drivers/net/usb/cdc-phonet.c
@@
-165,13
+165,13
@@
static void rx_complete(struct urb *req)
memcpy(skb_put(skb, 1), page_address(page), 1);
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
page, 1, req->actual_length,
-
req->actual_length
);
+
PAGE_SIZE
);
page = NULL;
}
} else {
skb_add_rx_frag(skb, skb_shinfo(skb)->nr_frags,
page, 0, req->actual_length,
-
req->actual_length
);
+
PAGE_SIZE
);
page = NULL;
}
if (req->actual_length < PAGE_SIZE)