From: Robin Holt <holt@sgi.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Robin Holt <holt@sgi.com>, Jack Steiner <steiner@sgi.com>,
linux-kernel <linux-kernel@vger.kernel.org>,
linux-mm@vger.kernel.org
Subject: [patch 8/8] [patch 8/8] X86: UV - XPC receive message reuse triggers invalid BUG_ON().
Date: Mon, 23 Nov 2009 19:39:45 -0600 [thread overview]
Message-ID: <20091124013955.101187000@alcatraz.americas.sgi.com> (raw)
In-Reply-To: <20091124013937.354595000@alcatraz.americas.sgi.com>
[-- Attachment #1: xpc_recv_msg_slots_wrap --]
[-- Type: text/plain, Size: 2225 bytes --]
This was a difficult bug to trip. XPC was in the middle of sending an
acknowledgement for a received message.
In xpc_received_payload_uv():
.
ret = xpc_send_gru_msg(ch->sn.uv.cached_notify_gru_mq_desc, msg,
sizeof(struct xpc_notify_mq_msghdr_uv));
if (ret != xpSuccess)
XPC_DEACTIVATE_PARTITION(&xpc_partitions[ch->partid], ret);
msg->hdr.msg_slot_number += ch->remote_nentries;
at the point in xpc_send_gru_msg() where the hardware has dispatched the
acknowledgement, the remote side is able to reuse the message structure
and send a message with a different slot number. This problem is made
worse by interrupts.
The adjustment of msg_slot_number and the BUG_ON in
xpc_handle_notify_mq_msg_uv() which verifies the msg_slot_number is
consistent are only used for debug purposes. Since a fix for this that
preserves the debug functionality would either have to infringe upon
the payload or allocate another structure just for debug, I decided to
remove it entirely.
To: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Robin Holt <holt@sgi.com>
Cc: Jack Steiner <steiner@sgi.com>
Cc: linux-kernel@vger.kernel.org
Cc: linux-mm@vger.kernel.org
---
drivers/misc/sgi-xp/xpc_uv.c | 3 ---
1 file changed, 3 deletions(-)
Index: pv1000000/drivers/misc/sgi-xp/xpc_uv.c
===================================================================
--- pv1000000.orig/drivers/misc/sgi-xp/xpc_uv.c 2009-11-23 18:41:47.000000000 -0600
+++ pv1000000/drivers/misc/sgi-xp/xpc_uv.c 2009-11-23 18:41:52.000000000 -0600
@@ -1427,7 +1427,6 @@ xpc_handle_notify_mq_msg_uv(struct xpc_p
msg_slot = ch_uv->recv_msg_slots +
(msg->hdr.msg_slot_number % ch->remote_nentries) * ch->entry_size;
- BUG_ON(msg->hdr.msg_slot_number != msg_slot->hdr.msg_slot_number);
BUG_ON(msg_slot->hdr.size != 0);
memcpy(msg_slot, msg, msg->hdr.size);
@@ -1651,8 +1650,6 @@ xpc_received_payload_uv(struct xpc_chann
sizeof(struct xpc_notify_mq_msghdr_uv));
if (ret != xpSuccess)
XPC_DEACTIVATE_PARTITION(&xpc_partitions[ch->partid], ret);
-
- msg->hdr.msg_slot_number += ch->remote_nentries;
}
static struct xpc_arch_operations xpc_arch_ops_uv = {
next prev parent reply other threads:[~2009-11-24 1:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-24 1:39 [patch 0/8] x86: UV - XPC fixes with related support functionality V2 Robin Holt
2009-11-24 1:39 ` [patch 1/8] x86: UV - Introduce a means to translate from gpa -> socket_paddr Robin Holt
2009-11-24 1:39 ` [patch 2/8] x86: UV - XPC needs to provide an abstraction for uv_gpa Robin Holt
2009-11-24 1:39 ` [patch 3/8] x86: UV - Introduce uv_gpa_is_mmr Robin Holt
2009-11-24 1:39 ` [patch 4/8] X86: UV - Implement a gru_read_gpa kernel function Robin Holt
2009-11-24 1:39 ` [patch 5/8] x86: UV - Update XPC to handle updated BIOS interface Robin Holt
2009-11-24 1:39 ` [patch 6/8] x86: UV - XPC NULL deref when mesq becomes empty Robin Holt
2009-11-24 1:39 ` [patch 7/8] X86: UV - xpc_make_first_contact hang due to not accepting ACTIVE state Robin Holt
2009-11-24 1:39 ` Robin Holt [this message]
2009-12-15 17:04 ` [patch 0/8] x86: UV - XPC fixes with related support functionality V2 Robin Holt
2009-12-15 17:06 ` 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=20091124013955.101187000@alcatraz.americas.sgi.com \
--to=holt@sgi.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@vger.kernel.org \
--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®