This is a note to let you know that I've just added the patch titled

    IB/qib: Fix local access validation for user MRs

to the 3.6-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:
     ib-qib-fix-local-access-validation-for-user-mrs.patch
and it can be found in the queue-3.6 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


>From c00aaa1a0221a22153071fcb2f320e2ebaecc2fd Mon Sep 17 00:00:00 2001
From: Mike Marciniszyn <[email protected]>
Date: Fri, 28 Sep 2012 17:33:52 +0000
Subject: IB/qib: Fix local access validation for user MRs

From: Mike Marciniszyn <[email protected]>

commit c00aaa1a0221a22153071fcb2f320e2ebaecc2fd upstream.

Commit 8aac4cc3a9d7 ("IB/qib: RCU locking for MR validation") introduced
a bug that broke user post sends.  The proper validation of the MR
was lost in the patch.

This patch corrects that validation.

Reviewed-by: Dean Luick <[email protected]>
Signed-off-by: Mike Marciniszyn <[email protected]>
Signed-off-by: Roland Dreier <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 drivers/infiniband/hw/qib/qib_keys.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

--- a/drivers/infiniband/hw/qib/qib_keys.c
+++ b/drivers/infiniband/hw/qib/qib_keys.c
@@ -186,8 +186,9 @@ int qib_lkey_ok(struct qib_lkey_table *r
                goto bail;
 
        off = sge->addr - mr->user_base;
-       if (unlikely(sge->addr < mr->iova || off + sge->length > mr->length ||
-                    (mr->access_flags & acc) == 0))
+       if (unlikely(sge->addr < mr->user_base ||
+                    off + sge->length > mr->length ||
+                    (mr->access_flags & acc) != acc))
                goto bail;
        if (unlikely(!atomic_inc_not_zero(&mr->refcount)))
                goto bail;


Patches currently in stable-queue which might be from 
[email protected] are

queue-3.6/ib-qib-fix-local-access-validation-for-user-mrs.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to