From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Cyrille Pitchen <cyrille.pitchen@atmel.com>,
Nicolas Ferre <nicolas.ferre@atmel.com>,
netdev@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 2/6] net/macb: check if macb_config present
Date: Fri, 24 Jul 2015 21:24:00 +0300 [thread overview]
Message-ID: <1437762244-2678-3-git-send-email-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <1437762244-2678-1-git-send-email-andriy.shevchenko@linux.intel.com>
The commit 98b5a0f4a228 introduces jumbo frame support, but also it assumes
that macb_config present which is not always true.
The configuration without macb_config fails to boot.
Unable to handle kernel NULL pointer dereference at virtual address 00000010
ptbr = 90350000 pgd = 00000000
Oops: Kernel access of bad area, sig: 11 [#1]
FRAME_POINTER chip: 0x01f:0x1e82 rev 2
Modules linked in:
CPU: 0 PID: 1 Comm: swapper Not tainted 4.2.0-rc3-next-20150723+ #13
task: 91c26000 ti: 91c28000 task.ti: 91c28000
PC is at macb_probe+0x140/0x61c
Fixes: 98b5a0f4a228 (net: macb: Add support for jumbo frames)
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
drivers/net/ethernet/cadence/macb.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/cadence/macb.c b/drivers/net/ethernet/cadence/macb.c
index 6980115..7986778 100644
--- a/drivers/net/ethernet/cadence/macb.c
+++ b/drivers/net/ethernet/cadence/macb.c
@@ -2885,9 +2885,8 @@ static int macb_probe(struct platform_device *pdev)
bp->pclk = pclk;
bp->hclk = hclk;
bp->tx_clk = tx_clk;
- if (macb_config->jumbo_max_len) {
+ if (macb_config)
bp->jumbo_max_len = macb_config->jumbo_max_len;
- }
spin_lock_init(&bp->lock);
--
2.4.6
next prev parent reply other threads:[~2015-07-24 18:24 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-24 18:23 [PATCH v1 0/6] net/macb: fix for AVR32 and clean up Andy Shevchenko
2015-07-24 18:23 ` [PATCH v1 1/6] net/macb: improve big endian CPU support Andy Shevchenko
2015-07-24 18:24 ` Andy Shevchenko [this message]
2015-07-24 18:24 ` [PATCH v1 3/6] net/macb: use dev_*() when netdev is not yet registered Andy Shevchenko
2015-07-24 18:24 ` [PATCH v1 4/6] net/macb: suppress compiler warnings Andy Shevchenko
2015-07-24 18:24 ` [PATCH v1 5/6] net/macb: replace macb_count_tx_descriptors() by DIV_ROUND_UP() Andy Shevchenko
2015-07-24 18:24 ` [PATCH v1 6/6] net/macb: convert to kernel doc Andy Shevchenko
2015-07-27 8:10 ` [PATCH v1 0/6] net/macb: fix for AVR32 and clean up David Miller
2015-07-27 8:18 ` Nicolas Ferre
2015-07-27 8:26 ` 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=1437762244-2678-3-git-send-email-andriy.shevchenko@linux.intel.com \
--to=andriy.shevchenko@linux.intel.com \
--cc=cyrille.pitchen@atmel.com \
--cc=netdev@vger.kernel.org \
--cc=nicolas.ferre@atmel.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).