linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] of: fix autoloading due to broken modalias with no 'compatible'
@ 2016-06-06 16:48 Wolfram Sang
  2016-06-08 11:14 ` Michael Ellerman
  2016-06-10  3:26 ` Michael Ellerman
  0 siblings, 2 replies; 3+ messages in thread
From: Wolfram Sang @ 2016-06-06 16:48 UTC (permalink / raw)
  To: linuxppc-dev
  Cc: linux-kernel, devicetree, Wolfram Sang, Philipp Zabel,
	Andreas Schwab, Mathieu Malaterre

Because of an improper dereference, a stray 'C' character was output to
the modalias when no 'compatible' was specified. This is the case for
some old PowerMac drivers which only set the 'name' property. Fix it to
let them match again.

Reported-by: Mathieu Malaterre <malat@debian.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Tested-by: Mathieu Malaterre <malat@debian.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Fixes: 6543becf26fff6 ("mod/file2alias: make modalias generation safe for cross compiling")
---

I think it makes sense if this goes in via ppc (with stable tag added).
D'accord?

 scripts/mod/file2alias.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c
index a9155077feefb9..fec75786f75bbb 100644
--- a/scripts/mod/file2alias.c
+++ b/scripts/mod/file2alias.c
@@ -384,7 +384,7 @@ static void do_of_entry_multi(void *symval, struct module *mod)
 	len = sprintf(alias, "of:N%sT%s", (*name)[0] ? *name : "*",
 		      (*type)[0] ? *type : "*");
 
-	if (compatible[0])
+	if ((*compatible)[0])
 		sprintf(&alias[len], "%sC%s", (*type)[0] ? "*" : "",
 			*compatible);
 
-- 
2.8.1

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] of: fix autoloading due to broken modalias with no 'compatible'
  2016-06-06 16:48 [PATCH] of: fix autoloading due to broken modalias with no 'compatible' Wolfram Sang
@ 2016-06-08 11:14 ` Michael Ellerman
  2016-06-10  3:26 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2016-06-08 11:14 UTC (permalink / raw)
  To: Wolfram Sang, linuxppc-dev
  Cc: devicetree, Mathieu Malaterre, linux-kernel, Andreas Schwab,
	Philipp Zabel

On Mon, 2016-06-06 at 18:48 +0200, Wolfram Sang wrote:
> Because of an improper dereference, a stray 'C' character was output to
> the modalias when no 'compatible' was specified. This is the case for
> some old PowerMac drivers which only set the 'name' property. Fix it to
> let them match again.
> 
> Reported-by: Mathieu Malaterre <malat@debian.org>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> Tested-by: Mathieu Malaterre <malat@debian.org>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Andreas Schwab <schwab@linux-m68k.org>
> Fixes: 6543becf26fff6 ("mod/file2alias: make modalias generation safe for cross compiling")
> ---
> 
> I think it makes sense if this goes in via ppc (with stable tag added).
> D'accord?

Sure, I've grabbed it.

I added:

    Cc: stable@vger.kernel.org # v3.9+

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: of: fix autoloading due to broken modalias with no 'compatible'
  2016-06-06 16:48 [PATCH] of: fix autoloading due to broken modalias with no 'compatible' Wolfram Sang
  2016-06-08 11:14 ` Michael Ellerman
@ 2016-06-10  3:26 ` Michael Ellerman
  1 sibling, 0 replies; 3+ messages in thread
From: Michael Ellerman @ 2016-06-10  3:26 UTC (permalink / raw)
  To: Wolfram Sang, linuxppc-dev
  Cc: devicetree, Wolfram Sang, Mathieu Malaterre, linux-kernel,
	Andreas Schwab, Philipp Zabel

On Mon, 2016-06-06 at 16:48:38 UTC, Wolfram Sang wrote:
> Because of an improper dereference, a stray 'C' character was output to
> the modalias when no 'compatible' was specified. This is the case for
> some old PowerMac drivers which only set the 'name' property. Fix it to
> let them match again.
> 
> Reported-by: Mathieu Malaterre <malat@debian.org>
> Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
> Tested-by: Mathieu Malaterre <malat@debian.org>
> Cc: Philipp Zabel <p.zabel@pengutronix.de>
> Cc: Andreas Schwab <schwab@linux-m68k.org>
> Fixes: 6543becf26fff6 ("mod/file2alias: make modalias generation safe for cross compiling")

Applied to powerpc fixes, thanks.

https://git.kernel.org/powerpc/c/b3c0a4dab7e35a9b6d69c04156

cheers

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-06-10  3:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-06-06 16:48 [PATCH] of: fix autoloading due to broken modalias with no 'compatible' Wolfram Sang
2016-06-08 11:14 ` Michael Ellerman
2016-06-10  3:26 ` Michael Ellerman

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).