diff options
Diffstat (limited to 'net/phonet/pep.c')
-rw-r--r-- | net/phonet/pep.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/net/phonet/pep.c b/net/phonet/pep.c index eef833ea6d7b..b8252d289cd7 100644 --- a/net/phonet/pep.c +++ b/net/phonet/pep.c | |||
@@ -346,8 +346,10 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
346 | break; | 346 | break; |
347 | 347 | ||
348 | case PNS_PEP_CTRL_REQ: | 348 | case PNS_PEP_CTRL_REQ: |
349 | if (skb_queue_len(&pn->ctrlreq_queue) >= PNPIPE_CTRLREQ_MAX) | 349 | if (skb_queue_len(&pn->ctrlreq_queue) >= PNPIPE_CTRLREQ_MAX) { |
350 | atomic_inc(&sk->sk_drops); | ||
350 | break; | 351 | break; |
352 | } | ||
351 | __skb_pull(skb, 4); | 353 | __skb_pull(skb, 4); |
352 | queue = &pn->ctrlreq_queue; | 354 | queue = &pn->ctrlreq_queue; |
353 | goto queue; | 355 | goto queue; |
@@ -358,10 +360,13 @@ static int pipe_do_rcv(struct sock *sk, struct sk_buff *skb) | |||
358 | err = sock_queue_rcv_skb(sk, skb); | 360 | err = sock_queue_rcv_skb(sk, skb); |
359 | if (!err) | 361 | if (!err) |
360 | return 0; | 362 | return 0; |
363 | if (err == -ENOMEM) | ||
364 | atomic_inc(&sk->sk_drops); | ||
361 | break; | 365 | break; |
362 | } | 366 | } |
363 | 367 | ||
364 | if (pn->rx_credits == 0) { | 368 | if (pn->rx_credits == 0) { |
369 | atomic_inc(&sk->sk_drops); | ||
365 | err = -ENOBUFS; | 370 | err = -ENOBUFS; |
366 | break; | 371 | break; |
367 | } | 372 | } |