Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328574
b: refs/heads/master
c: c00aaa1
h: refs/heads/master
v: v3
  • Loading branch information
Mike Marciniszyn authored and Roland Dreier committed Oct 1, 2012
1 parent b3aa56e commit 04691fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: e20d583818a5d6fc052e59fe2345d82ffd089462
refs/heads/master: c00aaa1a0221a22153071fcb2f320e2ebaecc2fd
5 changes: 3 additions & 2 deletions trunk/drivers/infiniband/hw/qib/qib_keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,9 @@ int qib_lkey_ok(struct qib_lkey_table *rkt, struct qib_pd *pd,
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;
Expand Down

0 comments on commit 04691fc

Please sign in to comment.