All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] staging: irda: update MAINTAINERS
@ 2017-08-29  7:09 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-29  7:09 UTC (permalink / raw)
  To: davem, samuel; +Cc: netdev, linux-kernel, devel, Joe Perches

Now that the IRDA code has moved under drivers/staging/irda/, update the
MAINTAINERS file with the new location.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
---
 MAINTAINERS | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6fdfe2685eed..ff19b1c3141c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7101,9 +7101,7 @@ W:	http://irda.sourceforge.net/
 S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/irda-2.6.git
 F:	Documentation/networking/irda.txt
-F:	drivers/net/irda/
-F:	include/net/irda/
-F:	net/irda/
+F:	drivers/staging/irda/
 
 IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
 M:	Marc Zyngier <marc.zyngier@arm.com>
-- 
2.14.1

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

* [PATCH net-next] staging: irda: update MAINTAINERS
@ 2017-08-29  7:09 ` Greg Kroah-Hartman
  0 siblings, 0 replies; 17+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-29  7:09 UTC (permalink / raw)
  To: davem, samuel; +Cc: devel, netdev, Joe Perches, linux-kernel

Now that the IRDA code has moved under drivers/staging/irda/, update the
MAINTAINERS file with the new location.

Reported-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
---
 MAINTAINERS | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 6fdfe2685eed..ff19b1c3141c 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -7101,9 +7101,7 @@ W:	http://irda.sourceforge.net/
 S:	Maintained
 T:	git git://git.kernel.org/pub/scm/linux/kernel/git/sameo/irda-2.6.git
 F:	Documentation/networking/irda.txt
-F:	drivers/net/irda/
-F:	include/net/irda/
-F:	net/irda/
+F:	drivers/staging/irda/
 
 IRQ DOMAINS (IRQ NUMBER MAPPING LIBRARY)
 M:	Marc Zyngier <marc.zyngier@arm.com>
-- 
2.14.1

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

* [PATCH net-next] staging: irda: force to be a kernel module
  2017-08-29  7:09 ` Greg Kroah-Hartman
  (?)
@ 2017-08-29  9:14 ` Greg Kroah-Hartman
  2017-08-29 16:35     ` David Miller
  -1 siblings, 1 reply; 17+ messages in thread
From: Greg Kroah-Hartman @ 2017-08-29  9:14 UTC (permalink / raw)
  To: davem, samuel; +Cc: netdev, linux-kernel, devel

Now that the IRDA networking code has moved into drivers/staging/, the
link order is changed for when it is initialized if built into the
system.  This can cause a crash when initializing as the netfilter core
hasn't been initialized yet.

So force the IRDA code to be built as a module, preventing the crash.

Reported-by: kernel test robot <fengguang.wu@intel.com>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
---
 drivers/staging/irda/net/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/irda/net/Kconfig b/drivers/staging/irda/net/Kconfig
index 6abeae6c666a..9c6489bcb596 100644
--- a/drivers/staging/irda/net/Kconfig
+++ b/drivers/staging/irda/net/Kconfig
@@ -3,7 +3,7 @@
 #
 
 menuconfig IRDA
-	depends on NET && !S390
+	depends on NET && !S390 && m
 	tristate "IrDA (infrared) subsystem support"
 	select CRC_CCITT
 	---help---
-- 
2.14.1

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

* Re: [PATCH net-next] staging: irda: update MAINTAINERS
  2017-08-29  7:09 ` Greg Kroah-Hartman
@ 2017-08-29 16:30   ` David Miller
  -1 siblings, 0 replies; 17+ messages in thread
From: David Miller @ 2017-08-29 16:30 UTC (permalink / raw)
  To: gregkh; +Cc: samuel, netdev, linux-kernel, devel, joe

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Tue, 29 Aug 2017 09:09:29 +0200

> Now that the IRDA code has moved under drivers/staging/irda/, update the
> MAINTAINERS file with the new location.
> 
> Reported-by: Joe Perches <joe@perches.com>
> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org

Applied.

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

* Re: [PATCH net-next] staging: irda: update MAINTAINERS
@ 2017-08-29 16:30   ` David Miller
  0 siblings, 0 replies; 17+ messages in thread
From: David Miller @ 2017-08-29 16:30 UTC (permalink / raw)
  To: gregkh; +Cc: devel, netdev, samuel, joe, linux-kernel

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Tue, 29 Aug 2017 09:09:29 +0200

> Now that the IRDA code has moved under drivers/staging/irda/, update the
> MAINTAINERS file with the new location.
> 
> Reported-by: Joe Perches <joe@perches.com>
> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org

Applied.

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

* Re: [PATCH net-next] staging: irda: force to be a kernel module
  2017-08-29  9:14 ` [PATCH net-next] staging: irda: force to be a kernel module Greg Kroah-Hartman
@ 2017-08-29 16:35     ` David Miller
  0 siblings, 0 replies; 17+ messages in thread
From: David Miller @ 2017-08-29 16:35 UTC (permalink / raw)
  To: gregkh; +Cc: samuel, netdev, linux-kernel, devel

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Tue, 29 Aug 2017 11:14:17 +0200

> Now that the IRDA networking code has moved into drivers/staging/, the
> link order is changed for when it is initialized if built into the
> system.  This can cause a crash when initializing as the netfilter core
> hasn't been initialized yet.
> 
> So force the IRDA code to be built as a module, preventing the crash.
> 
> Reported-by: kernel test robot <fengguang.wu@intel.com>
> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org

I don't think this is reasonable.

IRDA being built in was broken by moving it to staging, so it's a
regression and we should find a way to fix it.

It's one thing if IRDA on it's own has deteriorated and broken in some
ways over time due to lack of maintainence, it's another to knowingly
do something to it that causes a regression which is what happened
here.

Thanks.

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

* Re: [PATCH net-next] staging: irda: force to be a kernel module
@ 2017-08-29 16:35     ` David Miller
  0 siblings, 0 replies; 17+ messages in thread
From: David Miller @ 2017-08-29 16:35 UTC (permalink / raw)
  To: gregkh; +Cc: devel, netdev, samuel, linux-kernel

From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Tue, 29 Aug 2017 11:14:17 +0200

> Now that the IRDA networking code has moved into drivers/staging/, the
> link order is changed for when it is initialized if built into the
> system.  This can cause a crash when initializing as the netfilter core
> hasn't been initialized yet.
> 
> So force the IRDA code to be built as a module, preventing the crash.
> 
> Reported-by: kernel test robot <fengguang.wu@intel.com>
> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org

I don't think this is reasonable.

IRDA being built in was broken by moving it to staging, so it's a
regression and we should find a way to fix it.

It's one thing if IRDA on it's own has deteriorated and broken in some
ways over time due to lack of maintainence, it's another to knowingly
do something to it that causes a regression which is what happened
here.

Thanks.

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

* Re: [PATCH net-next] staging: irda: force to be a kernel module
  2017-08-29 16:35     ` David Miller
  (?)
@ 2017-08-29 17:26     ` Greg KH
  2017-08-29 17:31       ` Greg KH
  2017-08-29 17:40       ` [PATCH net-next] staging: irda: force to be a kernel module David Miller
  -1 siblings, 2 replies; 17+ messages in thread
From: Greg KH @ 2017-08-29 17:26 UTC (permalink / raw)
  To: David Miller; +Cc: samuel, netdev, linux-kernel, devel

On Tue, Aug 29, 2017 at 09:35:07AM -0700, David Miller wrote:
> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Date: Tue, 29 Aug 2017 11:14:17 +0200
> 
> > Now that the IRDA networking code has moved into drivers/staging/, the
> > link order is changed for when it is initialized if built into the
> > system.  This can cause a crash when initializing as the netfilter core
> > hasn't been initialized yet.
> > 
> > So force the IRDA code to be built as a module, preventing the crash.
> > 
> > Reported-by: kernel test robot <fengguang.wu@intel.com>
> > Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
> 
> I don't think this is reasonable.
> 
> IRDA being built in was broken by moving it to staging, so it's a
> regression and we should find a way to fix it.

Hm, this is due to netlink coming before irda in the link order before
this patch series.  I can't change the link order to put all of net/
before drivers/, which would solve this, and I don't think I can put:
	obj-$(CONFIG_IRDA) += ../../drivers/staging/irda/net/
in a networking Makefile, can I?  Does "../" even work in a Makefile
like that?

Any other thoughts?

> It's one thing if IRDA on it's own has deteriorated and broken in some
> ways over time due to lack of maintainence, it's another to knowingly
> do something to it that causes a regression which is what happened
> here.

It has deteriorated and is broken and does not work at all from the
reports I have gotten, Linus pointing this out to me directly due to his
involvement in irda-related dive computers.  So I don't think anyone is
using this at all right now, it seems to crash when used anyway.  So no
one is running this "build in" code at the moment :)

ideas?

thanks,

greg k-h

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

* Re: [PATCH net-next] staging: irda: force to be a kernel module
  2017-08-29 17:26     ` Greg KH
@ 2017-08-29 17:31       ` Greg KH
  2017-08-29 17:46           ` Greg KH
  2017-08-29 17:40       ` [PATCH net-next] staging: irda: force to be a kernel module David Miller
  1 sibling, 1 reply; 17+ messages in thread
From: Greg KH @ 2017-08-29 17:31 UTC (permalink / raw)
  To: David Miller; +Cc: devel, netdev, samuel, linux-kernel

On Tue, Aug 29, 2017 at 07:26:08PM +0200, Greg KH wrote:
> On Tue, Aug 29, 2017 at 09:35:07AM -0700, David Miller wrote:
> > From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > Date: Tue, 29 Aug 2017 11:14:17 +0200
> > 
> > > Now that the IRDA networking code has moved into drivers/staging/, the
> > > link order is changed for when it is initialized if built into the
> > > system.  This can cause a crash when initializing as the netfilter core
> > > hasn't been initialized yet.
> > > 
> > > So force the IRDA code to be built as a module, preventing the crash.
> > > 
> > > Reported-by: kernel test robot <fengguang.wu@intel.com>
> > > Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
> > 
> > I don't think this is reasonable.
> > 
> > IRDA being built in was broken by moving it to staging, so it's a
> > regression and we should find a way to fix it.
> 
> Hm, this is due to netlink coming before irda in the link order before
> this patch series.  I can't change the link order to put all of net/
> before drivers/, which would solve this, and I don't think I can put:
> 	obj-$(CONFIG_IRDA) += ../../drivers/staging/irda/net/
> in a networking Makefile, can I?  Does "../" even work in a Makefile
> like that?

Wait, I think that does work, let me go test this some more...

thanks,

greg k-h-

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

* Re: [PATCH net-next] staging: irda: force to be a kernel module
  2017-08-29 17:26     ` Greg KH
  2017-08-29 17:31       ` Greg KH
@ 2017-08-29 17:40       ` David Miller
  1 sibling, 0 replies; 17+ messages in thread
From: David Miller @ 2017-08-29 17:40 UTC (permalink / raw)
  To: gregkh; +Cc: samuel, netdev, linux-kernel, devel

From: Greg KH <gregkh@linuxfoundation.org>
Date: Tue, 29 Aug 2017 19:26:08 +0200

> On Tue, Aug 29, 2017 at 09:35:07AM -0700, David Miller wrote:
>> From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> Date: Tue, 29 Aug 2017 11:14:17 +0200
>> 
>> > Now that the IRDA networking code has moved into drivers/staging/, the
>> > link order is changed for when it is initialized if built into the
>> > system.  This can cause a crash when initializing as the netfilter core
>> > hasn't been initialized yet.
>> > 
>> > So force the IRDA code to be built as a module, preventing the crash.
>> > 
>> > Reported-by: kernel test robot <fengguang.wu@intel.com>
>> > Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
>> 
>> I don't think this is reasonable.
>> 
>> IRDA being built in was broken by moving it to staging, so it's a
>> regression and we should find a way to fix it.
> 
> Hm, this is due to netlink coming before irda in the link order before
> this patch series.  I can't change the link order to put all of net/
> before drivers/, which would solve this, and I don't think I can put:
> 	obj-$(CONFIG_IRDA) += ../../drivers/staging/irda/net/
> in a networking Makefile, can I?  Does "../" even work in a Makefile
> like that?
> 
> Any other thoughts?

Change the initialization type in IRDA from subsys_init() to ...
something else?

Amazing!

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

* [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel
  2017-08-29 17:31       ` Greg KH
@ 2017-08-29 17:46           ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2017-08-29 17:46 UTC (permalink / raw)
  To: David Miller
  Cc: devel, netdev, samuel, linux-kernel, kernel test robot,
	Geert Uytterhoeven

When moving the IRDA code out of net/ into drivers/staging/irda/net, the
link order changes when IRDA is built into the kernel.  That causes a
kernel crash at boot time as netfilter isn't initialized yet.

To fix this, build and link the irda networking code in the same exact
order that it was previously before the move.

Reported-by: kernel test robot <fengguang.wu@intel.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
---
v2 - don't force irda to be a module, make the Makefiles put irda back
     where it was before in the link order.

 drivers/staging/Makefile | 1 -
 net/Makefile             | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index fced929a0e67..1192caa94435 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -2,7 +2,6 @@
 
 obj-y				+= media/
 obj-y				+= typec/
-obj-$(CONFIG_IRDA)		+= irda/net/
 obj-$(CONFIG_IRDA)		+= irda/drivers/
 obj-$(CONFIG_PRISM2_USB)	+= wlan-ng/
 obj-$(CONFIG_COMEDI)		+= comedi/
diff --git a/net/Makefile b/net/Makefile
index 3d3feff3643b..ddd059c3dfa4 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_NETROM)		+= netrom/
 obj-$(CONFIG_ROSE)		+= rose/
 obj-$(CONFIG_AX25)		+= ax25/
 obj-$(CONFIG_CAN)		+= can/
+obj-$(CONFIG_IRDA)		+= ../drivers/staging/irda/net/
 obj-$(CONFIG_BT)		+= bluetooth/
 obj-$(CONFIG_SUNRPC)		+= sunrpc/
 obj-$(CONFIG_AF_RXRPC)		+= rxrpc/
-- 
2.14.1

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

* [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel
@ 2017-08-29 17:46           ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2017-08-29 17:46 UTC (permalink / raw)
  To: David Miller
  Cc: devel, samuel, netdev, linux-kernel, Geert Uytterhoeven,
	kernel test robot

When moving the IRDA code out of net/ into drivers/staging/irda/net, the
link order changes when IRDA is built into the kernel.  That causes a
kernel crash at boot time as netfilter isn't initialized yet.

To fix this, build and link the irda networking code in the same exact
order that it was previously before the move.

Reported-by: kernel test robot <fengguang.wu@intel.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
---
v2 - don't force irda to be a module, make the Makefiles put irda back
     where it was before in the link order.

 drivers/staging/Makefile | 1 -
 net/Makefile             | 1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index fced929a0e67..1192caa94435 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -2,7 +2,6 @@
 
 obj-y				+= media/
 obj-y				+= typec/
-obj-$(CONFIG_IRDA)		+= irda/net/
 obj-$(CONFIG_IRDA)		+= irda/drivers/
 obj-$(CONFIG_PRISM2_USB)	+= wlan-ng/
 obj-$(CONFIG_COMEDI)		+= comedi/
diff --git a/net/Makefile b/net/Makefile
index 3d3feff3643b..ddd059c3dfa4 100644
--- a/net/Makefile
+++ b/net/Makefile
@@ -31,6 +31,7 @@ obj-$(CONFIG_NETROM)		+= netrom/
 obj-$(CONFIG_ROSE)		+= rose/
 obj-$(CONFIG_AX25)		+= ax25/
 obj-$(CONFIG_CAN)		+= can/
+obj-$(CONFIG_IRDA)		+= ../drivers/staging/irda/net/
 obj-$(CONFIG_BT)		+= bluetooth/
 obj-$(CONFIG_SUNRPC)		+= sunrpc/
 obj-$(CONFIG_AF_RXRPC)		+= rxrpc/
-- 
2.14.1

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

* Re: [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel
  2017-08-29 17:46           ` Greg KH
  (?)
@ 2017-08-29 17:49           ` David Miller
  2017-08-29 19:05               ` Greg KH
  -1 siblings, 1 reply; 17+ messages in thread
From: David Miller @ 2017-08-29 17:49 UTC (permalink / raw)
  To: gregkh; +Cc: devel, netdev, samuel, linux-kernel, fengguang.wu, geert

From: Greg KH <gregkh@linuxfoundation.org>
Date: Tue, 29 Aug 2017 19:46:22 +0200

> When moving the IRDA code out of net/ into drivers/staging/irda/net, the
> link order changes when IRDA is built into the kernel.  That causes a
> kernel crash at boot time as netfilter isn't initialized yet.
> 
> To fix this, build and link the irda networking code in the same exact
> order that it was previously before the move.
> 
> Reported-by: kernel test robot <fengguang.wu@intel.com>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org

Greg, just change the initializer in IRDA so that it will run
after subsys_init() when built statically.

IRDA is definitely not the first pontentially statically built
thing that needs netlink up and available.

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

* Re: [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel
  2017-08-29 17:49           ` David Miller
@ 2017-08-29 19:05               ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2017-08-29 19:05 UTC (permalink / raw)
  To: David Miller; +Cc: devel, netdev, samuel, linux-kernel, fengguang.wu, geert

On Tue, Aug 29, 2017 at 10:49:45AM -0700, David Miller wrote:
> From: Greg KH <gregkh@linuxfoundation.org>
> Date: Tue, 29 Aug 2017 19:46:22 +0200
> 
> > When moving the IRDA code out of net/ into drivers/staging/irda/net, the
> > link order changes when IRDA is built into the kernel.  That causes a
> > kernel crash at boot time as netfilter isn't initialized yet.
> > 
> > To fix this, build and link the irda networking code in the same exact
> > order that it was previously before the move.
> > 
> > Reported-by: kernel test robot <fengguang.wu@intel.com>
> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
> 
> Greg, just change the initializer in IRDA so that it will run
> after subsys_init() when built statically.
> 
> IRDA is definitely not the first pontentially statically built
> thing that needs netlink up and available.

Ok, will do that tomorrow and test it and send you the patch.

thanks,

greg k-h

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

* Re: [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel
@ 2017-08-29 19:05               ` Greg KH
  0 siblings, 0 replies; 17+ messages in thread
From: Greg KH @ 2017-08-29 19:05 UTC (permalink / raw)
  To: David Miller; +Cc: devel, samuel, netdev, linux-kernel, geert, fengguang.wu

On Tue, Aug 29, 2017 at 10:49:45AM -0700, David Miller wrote:
> From: Greg KH <gregkh@linuxfoundation.org>
> Date: Tue, 29 Aug 2017 19:46:22 +0200
> 
> > When moving the IRDA code out of net/ into drivers/staging/irda/net, the
> > link order changes when IRDA is built into the kernel.  That causes a
> > kernel crash at boot time as netfilter isn't initialized yet.
> > 
> > To fix this, build and link the irda networking code in the same exact
> > order that it was previously before the move.
> > 
> > Reported-by: kernel test robot <fengguang.wu@intel.com>
> > Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> > Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
> 
> Greg, just change the initializer in IRDA so that it will run
> after subsys_init() when built statically.
> 
> IRDA is definitely not the first pontentially statically built
> thing that needs netlink up and available.

Ok, will do that tomorrow and test it and send you the patch.

thanks,

greg k-h

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

* [PATCH v3 net-next] staging: irda: fix init level for irda core
  2017-08-29 17:46           ` Greg KH
  (?)
  (?)
@ 2017-08-30 11:16           ` Greg KH
  2017-08-30 17:15             ` David Miller
  -1 siblings, 1 reply; 17+ messages in thread
From: Greg KH @ 2017-08-30 11:16 UTC (permalink / raw)
  To: David Miller
  Cc: devel, netdev, samuel, linux-kernel, kernel test robot,
	Geert Uytterhoeven

When moving the IRDA code out of net/ into drivers/staging/irda/net, the
link order changes when IRDA is built into the kernel.  That causes a
kernel crash at boot time as netfilter isn't initialized yet.

To fix this, move the init call level of the irda core to be
device_initcall() as the link order keeps this being initialized at the
correct time.

Reported-by: kernel test robot <fengguang.wu@intel.com>
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

v3 - just change the initcall level, works so much simpler, thanks to
     DaveM for the idea.
v2 - don't force irda to be a module, make the Makefiles put irda back
     where it was before in the link order.

 drivers/staging/irda/net/irmod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/irda/net/irmod.c b/drivers/staging/irda/net/irmod.c
index c5e35b85c477..4319f4ff66b0 100644
--- a/drivers/staging/irda/net/irmod.c
+++ b/drivers/staging/irda/net/irmod.c
@@ -190,7 +190,7 @@ static void __exit irda_cleanup(void)
  *
  * Jean II
  */
-subsys_initcall(irda_init);
+device_initcall(irda_init);
 module_exit(irda_cleanup);
 
 MODULE_AUTHOR("Dag Brattli <dagb@cs.uit.no> & Jean Tourrilhes <jt@hpl.hp.com>");
-- 
2.14.1

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

* Re: [PATCH v3 net-next] staging: irda: fix init level for irda core
  2017-08-30 11:16           ` [PATCH v3 net-next] staging: irda: fix init level for irda core Greg KH
@ 2017-08-30 17:15             ` David Miller
  0 siblings, 0 replies; 17+ messages in thread
From: David Miller @ 2017-08-30 17:15 UTC (permalink / raw)
  To: gregkh; +Cc: devel, netdev, samuel, linux-kernel, fengguang.wu, geert

From: Greg KH <gregkh@linuxfoundation.org>
Date: Wed, 30 Aug 2017 13:16:49 +0200

> When moving the IRDA code out of net/ into drivers/staging/irda/net, the
> link order changes when IRDA is built into the kernel.  That causes a
> kernel crash at boot time as netfilter isn't initialized yet.
> 
> To fix this, move the init call level of the irda core to be
> device_initcall() as the link order keeps this being initialized at the
> correct time.
> 
> Reported-by: kernel test robot <fengguang.wu@intel.com>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> 
> v3 - just change the initcall level, works so much simpler, thanks to
>      DaveM for the idea.
> v2 - don't force irda to be a module, make the Makefiles put irda back
>      where it was before in the link order.

Applied, thanks for following up on this Greg.

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

end of thread, other threads:[~2017-08-30 17:15 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-08-29  7:09 [PATCH net-next] staging: irda: update MAINTAINERS Greg Kroah-Hartman
2017-08-29  7:09 ` Greg Kroah-Hartman
2017-08-29  9:14 ` [PATCH net-next] staging: irda: force to be a kernel module Greg Kroah-Hartman
2017-08-29 16:35   ` David Miller
2017-08-29 16:35     ` David Miller
2017-08-29 17:26     ` Greg KH
2017-08-29 17:31       ` Greg KH
2017-08-29 17:46         ` [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel Greg KH
2017-08-29 17:46           ` Greg KH
2017-08-29 17:49           ` David Miller
2017-08-29 19:05             ` Greg KH
2017-08-29 19:05               ` Greg KH
2017-08-30 11:16           ` [PATCH v3 net-next] staging: irda: fix init level for irda core Greg KH
2017-08-30 17:15             ` David Miller
2017-08-29 17:40       ` [PATCH net-next] staging: irda: force to be a kernel module David Miller
2017-08-29 16:30 ` [PATCH net-next] staging: irda: update MAINTAINERS David Miller
2017-08-29 16:30   ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.