From: frank.blaschka@de.ibm.com
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, linux-s390@vger.kernel.org,
Stefan Raspl <raspl@linux.vnet.ibm.com>
Subject: [patch 4/5] qeth: Fix crash on initial MTU size change
Date: Mon, 24 Jun 2013 13:21:51 +0200 [thread overview]
Message-ID: <20130624112226.756049779@de.ibm.com> (raw)
In-Reply-To: 20130624112147.347247916@de.ibm.com
[-- Attachment #1: 603-qeth-initial-mtu-crash.diff --]
[-- Type: text/plain, Size: 1143 bytes --]
From: Stefan Raspl <raspl@linux.vnet.ibm.com>
When the initial MTU size is changed prior to any activity on the device
(e.g. by attaching a z/VM vNIC already configured in Linux to a guestLAN),
we call dev_kfree_skb_irq(NULL) which results in a kernel panic.
Adding a proper check for NULL pointers to address this issue.
Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <blaschka@linux.vnet.ibm.com>
Reviewed-by: Ursula Braun <braunu@de.ibm.com>
---
drivers/s390/net/qeth_core_main.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/drivers/s390/net/qeth_core_main.c
+++ b/drivers/s390/net/qeth_core_main.c
@@ -1282,8 +1282,10 @@ static void qeth_free_qdio_buffers(struc
qeth_free_cq(card);
cancel_delayed_work_sync(&card->buffer_reclaim_work);
- for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j)
- dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb);
+ for (j = 0; j < QDIO_MAX_BUFFERS_PER_Q; ++j) {
+ if (card->qdio.in_q->bufs[j].rx_skb)
+ dev_kfree_skb_any(card->qdio.in_q->bufs[j].rx_skb);
+ }
kfree(card->qdio.in_q);
card->qdio.in_q = NULL;
/* inbound buffer pool */
next prev parent reply other threads:[~2013-06-24 11:22 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-24 11:21 [patch 0/5] s390: network patches for net-next frank.blaschka
2013-06-24 11:21 ` [patch 1/5] netiucv: remove unused macro frank.blaschka
2013-06-24 11:21 ` [patch 2/5] qeth: Increase default MTU for OSA devices frank.blaschka
2013-06-24 11:21 ` [patch 3/5] qeth: change default standard blkt settings for OSA frank.blaschka
2013-06-24 11:21 ` frank.blaschka [this message]
2013-06-24 11:21 ` [patch 5/5] qeth: use default napi weight frank.blaschka
2013-06-25 23:25 ` [patch 0/5] s390: network patches for net-next David Miller
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=20130624112226.756049779@de.ibm.com \
--to=frank.blaschka@de.ibm.com \
--cc=davem@davemloft.net \
--cc=linux-s390@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=raspl@linux.vnet.ibm.com \
/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).