aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRalph Campbell <ralph.campbell@qlogic.com>2010-06-17 19:13:59 -0400
committerRoland Dreier <rolandd@cisco.com>2010-07-06 17:13:21 -0400
commit5df4223a444057e433e9e4f2e101ee7159f8c19d (patch)
tree79022d504cfb79c471a2b25d2b6396a516bd88c3 /drivers
parentb9e03e0489a8616fc415e62128d05ad0159a20a2 (diff)
IB/qib: Clear eager buffer memory for each new process
The eager buffers are not being cleared before being mmapped into a new user address space. This is a potential security risk and should be fixed. Note that the eager header queue is already being cleared. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/infiniband/hw/qib/qib_init.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/qib/qib_init.c b/drivers/infiniband/hw/qib/qib_init.c
index 25895991dc52..1d4db4b19d76 100644
--- a/drivers/infiniband/hw/qib/qib_init.c
+++ b/drivers/infiniband/hw/qib/qib_init.c
@@ -1472,6 +1472,9 @@ int qib_setup_eagerbufs(struct qib_ctxtdata *rcd)
1472 dma_addr_t pa = rcd->rcvegrbuf_phys[chunk]; 1472 dma_addr_t pa = rcd->rcvegrbuf_phys[chunk];
1473 unsigned i; 1473 unsigned i;
1474 1474
1475 /* clear for security and sanity on each use */
1476 memset(rcd->rcvegrbuf[chunk], 0, size);
1477
1475 for (i = 0; e < egrcnt && i < egrperchunk; e++, i++) { 1478 for (i = 0; e < egrcnt && i < egrperchunk; e++, i++) {
1476 dd->f_put_tid(dd, e + egroff + 1479 dd->f_put_tid(dd, e + egroff +
1477 (u64 __iomem *) 1480 (u64 __iomem *)