Skip to contentSkip to conversation

staging: irda: update MAINTAINERS

PATCH Applied Greg Kroah-Hartman 2 participants 12 messages Aug 29, 2017 – Aug 30, 2017

Subsystems (3)
lore
Share & tools
lore

Greg Kroah-Hartman

author maintainer
#0 lore raw

PATCH 1/1 staging: irda: update MAINTAINERS

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

---
 MAINTAINERS | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
MAINTAINERS +1 -3
index 6fdfe2685eed..ff19b1c3141c 100644
@@ -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 <[email protected]>
Signature · 1 line
2.14.1
author maintainer
#1 lore raw

PATCH 1/1 staging: irda: force to be a kernel module

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.

---
 drivers/staging/irda/net/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/staging/irda/net/Kconfig +1 -1
index 6abeae6c666a..9c6489bcb596 100644
@@ -3,7 +3,7 @@
 #
 
 menuconfig IRDA
-	depends on NET && !S390
+	depends on NET && !S390 && m
 	tristate "IrDA (infrared) subsystem support"
 	select CRC_CCITT
 	---help---
Signature · 1 line
2.14.1
maintainer
#2 lore raw

Re: [PATCH net-next] staging: irda: force to be a kernel module

From: Greg Kroah-Hartman <[email protected]>
Date: Tue, 29 Aug 2017 11:14:17 +0200

Quoted 9 lines

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.

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.

author maintainer
#3 lore raw

Re: [PATCH net-next] staging: irda: force to be a kernel module

Quoted 10 lines · David Miller

From: Greg Kroah-Hartman <[email protected]>
Date: Tue, 29 Aug 2017 11:14:17 +0200

Quoted 7 lines

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.

Quoted 7 lines
Quoted 2 lines

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?

Quoted 4 lines

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

author maintainer
#4 lore raw

Re: [PATCH net-next] staging: irda: force to be a kernel module

Quoted 19 lines · Greg KH
Quoted 10 lines · David Miller

From: Greg Kroah-Hartman <[email protected]>
Date: Tue, 29 Aug 2017 11:14:17 +0200

Quoted 7 lines

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.

Quoted 7 lines
Quoted 2 lines

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.

Quoted 6 lines

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-

author maintainer
#5 lore raw

PATCH v2 1/1 irda: fix link order if IRDA is built into the kernel

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.

---
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(-)
drivers/staging/Makefile +0 -1
index fced929a0e67..1192caa94435 100644
@@ -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/
net/Makefile +1 -0
index 3d3feff3643b..ddd059c3dfa4 100644
@@ -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/
Signature · 1 line
2.14.1
maintainer
#6 lore raw

Re: [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel

From: Greg KH <[email protected]>
Date: Tue, 29 Aug 2017 19:46:22 +0200

Quoted 10 lines

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.

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.

author maintainer
#7 lore raw

Re: [PATCH v2 net-next] irda: fix link order if IRDA is built into the kernel

Quoted 14 lines · David Miller

From: Greg KH <[email protected]>
Date: Tue, 29 Aug 2017 19:46:22 +0200

Quoted 10 lines

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.

Quoted 5 lines

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

author maintainer
#8 lore raw

PATCH v3 1/1 staging: irda: fix init level for irda core

In reply to Greg KH

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.

---

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(-)
drivers/staging/irda/net/irmod.c +1 -1
index c5e35b85c477..4319f4ff66b0 100644
@@ -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 <[email protected]> & Jean Tourrilhes <[email protected]>");
Signature · 1 line
2.14.1
maintainer Applied
#9 lore raw

Re: [PATCH v3 net-next] staging: irda: fix init level for irda core

From: Greg KH <[email protected]>
Date: Wed, 30 Aug 2017 13:16:49 +0200

Quoted 11 lines

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.

Quoted 6 lines

---

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.

maintainer
#10 lore raw

Re: [PATCH net-next] staging: irda: force to be a kernel module

In reply to Greg KH

From: Greg KH <[email protected]>
Date: Tue, 29 Aug 2017 19:26:08 +0200

Quoted 19 lines · David Miller
Quoted 10 lines

From: Greg Kroah-Hartman <[email protected]>
Date: Tue, 29 Aug 2017 11:14:17 +0200

Quoted 7 lines

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.

Quoted 7 lines
Quoted 2 lines

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.

Quoted 8 lines

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!