Netdev List
 help / color / mirror / Atom feed
* [patch 15/17] pppoe: missing result check in __pppoe_xmit()
@ 2006-06-02  3:32 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2006-06-02  3:32 UTC (permalink / raw)
  To: davem; +Cc: netdev, akpm, fmalita, mostrows


From: Florin Malita <fmalita@gmail.com>

skb_clone() may fail, we should check the result.

Coverity CID: 1215.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: <mostrows@speakeasy.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 drivers/net/pppoe.c |    3 +++
 1 file changed, 3 insertions(+)

diff -puN drivers/net/pppoe.c~pppoe-missing-result-check-in-__pppoe_xmit drivers/net/pppoe.c
--- devel/drivers/net/pppoe.c~pppoe-missing-result-check-in-__pppoe_xmit	2006-06-01 20:31:50.000000000 -0700
+++ devel-akpm/drivers/net/pppoe.c	2006-06-01 20:31:50.000000000 -0700
@@ -861,6 +861,9 @@ static int __pppoe_xmit(struct sock *sk,
 		 * give dev_queue_xmit something it can free.
 		 */
 		skb2 = skb_clone(skb, GFP_ATOMIC);
+
+		if (skb2 == NULL)
+			goto abort;
 	}
 
 	ph = (struct pppoe_hdr *) skb_push(skb2, sizeof(struct pppoe_hdr));
_

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-02  3:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-02  3:32 [patch 15/17] pppoe: missing result check in __pppoe_xmit() akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox