From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Subject: [patch 1/2] af_iucv: recvmsg: use correct skb_pull() function
Date: Tue, 02 Apr 2013 12:56:51 +0200 [thread overview]
Message-ID: <20130402105707.116460653@de.ibm.com> (raw)
In-Reply-To: 20130402105650.056630101@de.ibm.com
[-- Attachment #1: 601-af-iucv-skb-pull.diff --]
[-- Type: text/plain, Size: 991 bytes --]
From: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
When receiving data messages, the "BUG_ON(skb->len < skb->data_len)" in
the skb_pull() function triggers a kernel panic.
Check if the skb uses paged data (is non-linear) and use the pskb_pull()
function. Use skb_pull() for linear skbs' only.
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
---
net/iucv/af_iucv.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
--- a/net/iucv/af_iucv.c
+++ b/net/iucv/af_iucv.c
@@ -1382,7 +1382,10 @@ static int iucv_sock_recvmsg(struct kioc
/* SOCK_STREAM: re-queue skb if it contains unreceived data */
if (sk->sk_type == SOCK_STREAM) {
- skb_pull(skb, copied);
+ if (skb_is_nonlinear(skb))
+ pskb_pull(skb, copied);
+ else
+ skb_pull(skb, copied);
if (skb->len) {
skb_queue_head(&sk->sk_receive_queue, skb);
goto done;
next prev parent reply other threads:[~2013-04-02 10:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-02 10:56 [patch 0/2] s390: network bug fixes for net frank.blaschka
2013-04-02 10:56 ` frank.blaschka [this message]
2013-04-02 15:37 ` [patch 1/2] af_iucv: recvmsg: use correct skb_pull() function Eric Dumazet
2013-04-02 10:56 ` [patch 2/2] qeth: fix qeth_wait_for_threads() deadlock for OSN devices frank.blaschka
2013-04-02 16:13 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130402105707.116460653@de.ibm.com \
--to=frank.blaschka@de.ibm.com \
--cc=brueckner@linux.vnet.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).