[openib-general] RE: [PATCH] uMAD: fix copying MAD data when reporting a send failure
Jack Morgenstein
jackm at mellanox.co.il
Wed Mar 1 02:23:30 PST 2006
On Tuesday 28 February 2006 07:21, Hefty, Sean wrote:
> > Sean> Fix a bug where the size of the data copied to userspace is
> > Sean> larger than the reported size. Re-use the failed send
> > Sean> packet when reporting the failure, versus copying the send
> > Sean> information to a new packet.
> >
There is a bug here (which our regression testing encountered last night),
which
causes a kernel Oops.
Fix is below.
- Jack
>>>>>>>>>>>>>>>>>>>>>>>>
Initialize seg_list properly when rerouting a send packet to receive queue.
The seg_list variable does not get initialized for send packets.
Signed-off-by: Jack Morgenstein <jackm at mellanox.co.il>
Index: last_stable/drivers/infiniband/core/user_mad.c
===================================================================
--- last_stable.orig/drivers/infiniband/core/user_mad.c 2006-03-01
11:51:35.000000000 +0200
+++ last_stable/drivers/infiniband/core/user_mad.c 2006-03-01
11:52:33.000000000 +0200
@@ -254,6 +254,7 @@ static void send_handler(struct ib_mad_a
ib_free_send_mad(packet->msg);
if (send_wc->status == IB_WC_RESP_TIMEOUT_ERR) {
+ INIT_LIST_HEAD(&packet->seg_list);
packet->length = IB_MGMT_MAD_HDR;
packet->mad.hdr.status = ETIMEDOUT;
if (!queue_packet(file, agent, packet))
More information about the general
mailing list