From: <gregkh@linuxfoundation.org>
To: werner.pawlitschko@arcor.de, gregkh@linuxfoundation.org,
tglx@linutronix.de
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "x86/ioapic: Prevent NULL pointer dereference in setup_ioapic_dest()" has been added to the 4.2-stable tree
Date: Thu, 05 Nov 2015 16:41:08 -0800 [thread overview]
Message-ID: <14467704685634@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
x86/ioapic: Prevent NULL pointer dereference in setup_ioapic_dest()
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
x86-ioapic-prevent-null-pointer-dereference-in-setup_ioapic_dest.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From ababae44108b0e94b58eef6cb5bd830bd040a47f Mon Sep 17 00:00:00 2001
From: Werner Pawlitschko <werner.pawlitschko@arcor.de>
Date: Tue, 27 Oct 2015 09:08:04 +0900
Subject: x86/ioapic: Prevent NULL pointer dereference in setup_ioapic_dest()
From: Werner Pawlitschko <werner.pawlitschko@arcor.de>
commit ababae44108b0e94b58eef6cb5bd830bd040a47f upstream.
Commit 4857c91f0d19 changed the way how irq affinity is setup in
setup_ioapic_dest() from using the core helper function to
unconditionally calling the irq_set_affinity() callback of the
underlying irq chip.
That results in a NULL pointer dereference for the rare case where the
underlying irq chip is lapic_chip which has no irq_set_affinity()
callback. lapic_chip is occasionally used for the timer interrupt (irq
0).
The fix is simple: Check the availability of the callback instead of
calling it unconditionally.
Fixes: 4857c91f0d19 "x86/ioapic: Force affinity setting in setup_ioapic_dest()"
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/x86/kernel/apic/io_apic.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -2547,7 +2547,9 @@ void __init setup_ioapic_dest(void)
mask = apic->target_cpus();
chip = irq_data_get_irq_chip(idata);
- chip->irq_set_affinity(idata, mask, false);
+ /* Might be lapic_chip for irq 0 */
+ if (chip->irq_set_affinity)
+ chip->irq_set_affinity(idata, mask, false);
}
}
#endif
Patches currently in stable-queue which might be from werner.pawlitschko@arcor.de are
queue-4.2/x86-ioapic-prevent-null-pointer-dereference-in-setup_ioapic_dest.patch
reply other threads:[~2015-11-06 0:41 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=14467704685634@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=tglx@linutronix.de \
--cc=werner.pawlitschko@arcor.de \
/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 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.