linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Gleixner <tglx@linutronix.de>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org, x86@kernel.org
Subject: [GIT pull] irq/urgent for 5.3-rc5
Date: Sun, 25 Aug 2019 09:43:00 -0000	[thread overview]
Message-ID: <156672618029.19810.8479315461492191933.tglx@nanos.tec.linutronix.de> (raw)

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);
 
 	/*



             reply	other threads:[~2019-08-25  9:45 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-25  9:43 Thomas Gleixner [this message]
2019-08-25  9:43 ` [GIT pull] x86/urgent for 5.3-rc5 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

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=156672618029.19810.8479315461492191933.tglx@nanos.tec.linutronix.de \
    --to=tglx@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.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).