linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Larry Finger <Larry.Finger@lwfinger.net>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
	Larry Finger <Larry.Finger@lwfinger.net>,
	linuxppc-dev@lists.ozlabs.org,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	"regressions @ leemhuis . info" <regressions@leemhuis.info>
Subject: [PATCH] powerpc: Fix crash introduced with commit 5657933dbb6e
Date: Thu,  9 Mar 2017 20:33:51 -0600	[thread overview]
Message-ID: <20170310023351.973-1-Larry.Finger@lwfinger.net> (raw)

Code inserted during the code merged between kernels 4.10 and 4.11-rc1
caused an early panic quickly followed by a complete shutdown for
PowerPC. The traceback was not displayed long enough to read or
photograph, thus it is not reproduced here.

The problem was bisected to commit 5657933dbb6e ("treewide: Move dma_ops
from struct dev_archdata into struct device"). The problem was a missing
copy of critical information from struct dev_archdata into struct device,
leading to the dereference of a null pointer.

This fix was suggested by Benjamin Herrenschmidt.

Fixes: commit 5657933dbb6e ("treewide: Move dma_ops from struct dev_archdata into struct device")
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: linuxppc-dev@lists.ozlabs.org
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: regressions@leemhuis.info <regressions@leemhuis.info>

 drivers/macintosh/macio_asic.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/macintosh/macio_asic.c b/drivers/macintosh/macio_asic.c
index 3f041b1..f757cef2 100644
--- a/drivers/macintosh/macio_asic.c
+++ b/drivers/macintosh/macio_asic.c
@@ -392,6 +392,7 @@ static struct macio_dev * macio_add_one_device(struct macio_chip *chip,
 	 * To get all the fields, copy all archdata
 	 */
 	dev->ofdev.dev.archdata = chip->lbus.pdev->dev.archdata;
+	dev->ofdev.dev.dma_ops = chip->lbus.pdev->dev.dma_ops;
 #endif /* CONFIG_PCI */
 
 #ifdef DEBUG
-- 
2.10.2

             reply	other threads:[~2017-03-10  2:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-10  2:33 Larry Finger [this message]
2017-03-11 17:07 ` [PATCH] powerpc: Fix crash introduced with commit 5657933dbb6e Linus Torvalds
2017-03-14 11:46 ` Michael Ellerman

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=20170310023351.973-1-Larry.Finger@lwfinger.net \
    --to=larry.finger@lwfinger.net \
    --cc=benh@kernel.crashing.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=regressions@leemhuis.info \
    --cc=torvalds@linux-foundation.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).