All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] econet: have failed ec_queue_packet() call return NET_RX_BAD
@ 2009-06-20 10:34 Mark Smith
  2009-06-20 10:53 ` Florian Westphal
  0 siblings, 1 reply; 9+ messages in thread
From: Mark Smith @ 2009-06-20 10:34 UTC (permalink / raw)
  To: netdev, davem

econet_rcv() calls ec_queue_packet(). The return from ec_queue_packet()
is the direct result of a call to sock_queue_rcv_skb(). Error returns
from ec_queue_packet() and therefore sock_queue_rcv_skb() are due to
kernel errors, so have econet_rcv() return NET_RX_BAD in this case.

If my understanding is correct, then

Signed-off-by: Mark Smith <markzzzsmith@yahoo.com.au>

diff --git a/net/econet/af_econet.c b/net/econet/af_econet.c
index 6f479fa..07f0f90 100644
--- a/net/econet/af_econet.c
+++ b/net/econet/af_econet.c
@@ -1092,8 +1092,10 @@ static int econet_rcv(struct sk_buff *skb, struct net_device *dev, struct packet
 		goto drop;
 
 	if (ec_queue_packet(sk, skb, edev->net, hdr->src_stn, hdr->cb,
-			    hdr->port))
-		goto drop;
+			    hdr->port)) {
+		kfree_skb(skb);
+		return NET_RX_BAD;
+	}
 
 	return 0;
 


^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-07-06 21:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-06-20 10:34 [PATCH] econet: have failed ec_queue_packet() call return NET_RX_BAD Mark Smith
2009-06-20 10:53 ` Florian Westphal
2009-06-20 11:20   ` Mark Smith
2009-06-22  5:50     ` David Miller
2009-06-22  6:50       ` Mark Smith
2009-07-06  2:47   ` David Miller
2009-07-06 10:32     ` Mark Smith
2009-07-06 18:48       ` David Miller
2009-07-06 21:07         ` Mark Smith

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.