From: Robin Holt <holt@sgi.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Robin Holt <holt@sgi.com>, Jack Steiner <steiner@sgi.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [patch 5/6] x86: UV - XPC NULL deref when mesq becomes empty.
Date: Mon, 09 Nov 2009 11:08:59 -0600 [thread overview]
Message-ID: <20091109170907.059143000@alcatraz.americas.sgi.com> (raw)
In-Reply-To: <20091109170854.161447000@alcatraz.americas.sgi.com>
[-- Attachment #1: xpc_fix_xpc_get_fifo_entry_uv --]
[-- Type: text/plain, Size: 1062 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.
To: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: lkml <linux-kernel@vger.kernel.org>
---
drivers/misc/sgi-xp/xpc_uv.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
Index: linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c
===================================================================
--- linux-2.6.27.orig/drivers/misc/sgi-xp/xpc_uv.c 2009-10-29 10:43:23.000000000 -0500
+++ linux-2.6.27/drivers/misc/sgi-xp/xpc_uv.c 2009-10-29 13:23:19.000000000 -0500
@@ -947,11 +947,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-09 17:09 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-09 17:08 [patch 0/6] x86: UV - XPC fixes with related support functionality Robin Holt
2009-11-09 17:08 ` [patch 1/6] x86: UV - Introduce a means to translate from gpa -> socket_paddr Robin Holt
2009-11-09 17:08 ` [patch 2/6] x86: UV - XPC needs to provide an abstraction for uv_gpa Robin Holt
2009-11-09 17:08 ` [patch 3/6] x86: UV - Introduce uv_gpa_is_mmr Robin Holt
2009-11-09 17:08 ` [patch 4/6] x86: UV - Update XPC to handle updated BIOS interface Robin Holt
2009-11-09 17:08 ` Robin Holt [this message]
2009-11-09 17:09 ` [patch 6/6] X86: UV - xpc_make_first_contact hang due to not accepting ACTIVE state 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=20091109170907.059143000@alcatraz.americas.sgi.com \
--to=holt@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=steiner@sgi.com \
/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®