projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a423330
)
mlx4_en: Handle page allocation failure during receive
author
Yevgeny Petrilin
<yevgenyp@mellanox.co.il>
Sun, 26 Apr 2009 20:42:57 +0000
(20:42 +0000)
committer
David S. Miller
<davem@davemloft.net>
Mon, 27 Apr 2009 09:31:31 +0000
(
02:31
-0700)
If we failed to allocate new fragments for receive buffer,
the packet should be dropped and packets should be reused.
Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/mlx4/en_rx.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/net/mlx4/en_rx.c
b/drivers/net/mlx4/en_rx.c
index 0cbb78ca7b29ad100f89553ab2bd17693cff3c89..7942c4d3cd8835dd2bf29d6522e4a1f2ab92a099 100644
(file)
--- a/
drivers/net/mlx4/en_rx.c
+++ b/
drivers/net/mlx4/en_rx.c
@@
-610,6
+610,10
@@
static struct sk_buff *mlx4_en_rx_skb(struct mlx4_en_priv *priv,
used_frags = mlx4_en_complete_rx_desc(priv, rx_desc, skb_frags,
skb_shinfo(skb)->frags,
page_alloc, length);
+ if (unlikely(!used_frags)) {
+ kfree_skb(skb);
+ return NULL;
+ }
skb_shinfo(skb)->nr_frags = used_frags;
/* Copy headers into the skb linear buffer */