diff options
author | Faisal Latif <faisal.latif@intel.com> | 2009-12-09 23:54:23 (GMT) |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2009-12-09 23:54:23 (GMT) |
commit | fd000e12a564bdeaec5e5a438d341d9132409f26 (patch) | |
tree | 6e0a0eb3846b11d8dcb7ee8c5640b32809721bb6 /drivers/infiniband/hw/nes/nes_verbs.c | |
parent | 886f98a31586fd560fe83c44ad72e3ebe62f8e2e (diff) | |
download | linux-fsl-qoriq-fd000e12a564bdeaec5e5a438d341d9132409f26.tar.xz |
RDMA/nes: Check for zero STag
STags are generated randomly but the driver does not correctly prevent
a zero STag. Using STag zero is privileged and causes a user space
application to fail. This change prevents the driver from trying to
allocate a zero STag.
Signed-off-by: Faisal Latif <faisal.latif@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/nes/nes_verbs.c')
-rw-r--r-- | drivers/infiniband/hw/nes/nes_verbs.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/infiniband/hw/nes/nes_verbs.c b/drivers/infiniband/hw/nes/nes_verbs.c index 67a87cb..53dc39f 100644 --- a/drivers/infiniband/hw/nes/nes_verbs.c +++ b/drivers/infiniband/hw/nes/nes_verbs.c @@ -2503,9 +2503,6 @@ static struct ib_mr *nes_reg_user_mr(struct ib_pd *pd, u64 start, u64 length, stag = stag_index << 8; stag |= driver_key; stag += (u32)stag_key; - if (stag == 0) { - stag = 1; - } iova_start = virt; /* Make the leaf PBL the root if only one PBL */ |