From: Robin Holt <holt@sgi.com>
To: Ingo Molnar <mingo@elte.hu>, tglx@linutronix.de
Cc: Robin Holt <holt@sgi.com>, Jack Steiner <steiner@sgi.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [patch 6/8] x86: UV - XPC NULL deref when mesq becomes empty.
Date: Thu, 19 Nov 2009 11:32:03 -0600 [thread overview]
Message-ID: <20091119173209.848367000@alcatraz.americas.sgi.com> (raw)
In-Reply-To: <20091119173157.337874000@alcatraz.americas.sgi.com>
[-- Attachment #1: xpc_fix_xpc_get_fifo_entry_uv --]
[-- Type: text/plain, Size: 1107 bytes --]
Under heavy load conditions, our set of xpc messages may become exhausted.
The code handles this correctly with the exception of the management
code which hits a NULL pointer dereference.
To: Ingo Molnar <mingo@elte.hu>
To: tglx@linutronix.de
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: linux-kernel@vger.kernel.org
---
drivers/misc/sgi-xp/xpc_uv.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: linux-x86/drivers/misc/sgi-xp/xpc_uv.c
===================================================================
--- linux-x86.orig/drivers/misc/sgi-xp/xpc_uv.c 2009-11-18 21:41:23.000000000 -0600
+++ linux-x86/drivers/misc/sgi-xp/xpc_uv.c 2009-11-18 21:41:26.000000000 -0600
@@ -949,11 +949,13 @@ xpc_get_fifo_entry_uv(struct xpc_fifo_he
head->first = first->next;
if (head->first == NULL)
head->last = NULL;
+
+ head->n_entries--;
+ BUG_ON(head->n_entries < 0);
+
+ first->next = NULL;
}
- head->n_entries--;
- BUG_ON(head->n_entries < 0);
spin_unlock_irqrestore(&head->lock, irq_flags);
- first->next = NULL;
return first;
}
next prev parent reply other threads:[~2009-11-19 17:32 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-19 17:31 [patch 0/8] x86: UV - XPC fixes with related support functionality V2 Robin Holt
2009-11-19 17:31 ` [patch 1/8] x86: UV - Introduce a means to translate from gpa -> socket_paddr Robin Holt
2009-11-19 17:31 ` [patch 2/8] x86: UV - XPC needs to provide an abstraction for uv_gpa Robin Holt
2009-11-19 17:32 ` [patch 3/8] x86: UV - Introduce uv_gpa_is_mmr Robin Holt
2009-11-19 17:32 ` [patch 4/8] X86: UV - Implement a gru_read_gpa kernel function Robin Holt
2009-11-19 17:32 ` [patch 5/8] x86: UV - Update XPC to handle updated BIOS interface Robin Holt
2009-11-19 17:32 ` Robin Holt [this message]
2009-11-19 17:32 ` [patch 7/8] X86: UV - xpc_make_first_contact hang due to not accepting ACTIVE state Robin Holt
2009-11-19 17:32 ` [patch 8/8] X86: UV - XPC receive message reuse triggers invalid BUG_ON() Robin Holt
2009-11-23 18:03 ` [patch 0/8] x86: UV - XPC fixes with related support functionality V2 Ingo Molnar
2009-11-23 18:10 ` Ingo Molnar
2009-11-23 23:57 ` Robin Holt
2009-11-24 7:19 ` Ingo Molnar
2009-11-24 1:39 Robin Holt
2009-11-24 1:39 ` [patch 6/8] x86: UV - XPC NULL deref when mesq becomes empty Robin Holt
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=20091119173209.848367000@alcatraz.americas.sgi.com \
--to=holt@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=steiner@sgi.com \
--cc=tglx@linutronix.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®