linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [GIT pull] irq/urgent for 5.3-rc5
@ 2019-08-25  9:43 Thomas Gleixner
  2019-08-25  9:43 ` [GIT pull] x86/urgent " Thomas Gleixner
                   ` (4 more replies)
  0 siblings, 5 replies; 28+ messages in thread
From: Thomas Gleixner @ 2019-08-25  9:43 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, x86

Linus,

please pull the latest irq-urgent-for-linus git tree from:

   git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git irq-urgent-for-linus

up to:  d0ff14fdc987: genirq: Properly pair kobject_del() with kobject_add()

A single fix for a imbalanced kobject operation in the irq decriptor code
which was unearthed by the new warnings in the kobject code.

Thanks,

	tglx

------------------>
Michael Kelley (1):
      genirq: Properly pair kobject_del() with kobject_add()


 kernel/irq/irqdesc.c | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)

diff --git a/kernel/irq/irqdesc.c b/kernel/irq/irqdesc.c
index 9484e88dabc2..9be995fc3c5a 100644
--- a/kernel/irq/irqdesc.c
+++ b/kernel/irq/irqdesc.c
@@ -295,6 +295,18 @@ static void irq_sysfs_add(int irq, struct irq_desc *desc)
 	}
 }
 
+static void irq_sysfs_del(struct irq_desc *desc)
+{
+	/*
+	 * If irq_sysfs_init() has not yet been invoked (early boot), then
+	 * irq_kobj_base is NULL and the descriptor was never added.
+	 * kobject_del() complains about a object with no parent, so make
+	 * it conditional.
+	 */
+	if (irq_kobj_base)
+		kobject_del(&desc->kobj);
+}
+
 static int __init irq_sysfs_init(void)
 {
 	struct irq_desc *desc;
@@ -325,6 +337,7 @@ static struct kobj_type irq_kobj_type = {
 };
 
 static void irq_sysfs_add(int irq, struct irq_desc *desc) {}
+static void irq_sysfs_del(struct irq_desc *desc) {}
 
 #endif /* CONFIG_SYSFS */
 
@@ -438,7 +451,7 @@ static void free_desc(unsigned int irq)
 	 * The sysfs entry must be serialized against a concurrent
 	 * irq_sysfs_init() as well.
 	 */
-	kobject_del(&desc->kobj);
+	irq_sysfs_del(desc);
 	delete_irq_desc(irq);
 
 	/*



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

end of thread, other threads:[~2019-10-02 19:10 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-25  9:43 [GIT pull] irq/urgent for 5.3-rc5 Thomas Gleixner
2019-08-25  9:43 ` [GIT pull] x86/urgent " Thomas Gleixner
2019-08-25 17:18   ` Linus Torvalds
2019-08-25 17:30     ` Borislav Petkov
2019-08-25 17:37       ` Linus Torvalds
2019-08-25 18:29         ` Borislav Petkov
2019-08-25 18:38           ` Linus Torvalds
2019-08-25 19:32             ` Borislav Petkov
2019-08-25 19:35               ` Linus Torvalds
2019-08-25 19:49                 ` Borislav Petkov
2019-08-25 19:59                   ` Linus Torvalds
2019-08-25 20:17                     ` Borislav Petkov
2019-08-26 12:53                       ` Borislav Petkov
2019-08-27 16:55                         ` Linus Torvalds
2019-08-27 17:39                           ` Borislav Petkov
2019-08-27 17:46                             ` Linus Torvalds
2019-08-27 17:59                               ` Borislav Petkov
2019-08-28 15:20                             ` David Sterba
2019-08-28 15:53                               ` David Sterba
2019-10-02 19:09     ` [tip: x86/cpu] x86/rdrand: Sanity-check RDRAND output tip-bot2 for Borislav Petkov
2019-08-25 17:40   ` [GIT pull] x86/urgent for 5.3-rc5 pr-tracker-bot
2019-08-25  9:43 ` [GIT pull] timers/urgent " Thomas Gleixner
2019-08-25 17:40   ` pr-tracker-bot
2019-08-25  9:43 ` [GIT pull] perf/urgent " Thomas Gleixner
2019-08-25 17:40   ` pr-tracker-bot
2019-08-25  9:43 ` [GIT pull] sched/urgent " Thomas Gleixner
2019-08-25 17:40   ` pr-tracker-bot
2019-08-25 17:40 ` [GIT pull] irq/urgent " pr-tracker-bot

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