summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/i40iw/i40iw.h
diff options
context:
space:
mode:
authorShiraz Saleem <shiraz.saleem@intel.com>2016-08-23 02:09:14 +0300
committerDoug Ledford <dledford@redhat.com>2016-08-23 19:40:19 +0300
commit6c7d46fdb8165ece4b0a17fb8f0b9320dbfeffc2 (patch)
treeed750a40801fa22db1a1eeef65b521f4101dbeea /drivers/infiniband/hw/i40iw/i40iw.h
parent92d27ae6b3bb3491c1685fb3ca7ae1b26d81bdf4 (diff)
downloadlinux-6c7d46fdb8165ece4b0a17fb8f0b9320dbfeffc2.tar.xz
i40iw: Change mem_resources pointer to a u8
iwdev->mem_resources is incorrectly defined as an unsigned long instead of u8. As a result, the offset into the dynamic allocated structures in i40iw_initialize_hw_resources() is incorrectly calculated and would lead to writing of memory regions outside of the allocated buffer. Fixes: 8e06af711bf2 ("i40iw: add main, hdr, status") Reported-by: Stefan Assmann <sassmann@redhat.com> Signed-off-by: Mustafa Ismail <mustafa.ismail@intel.com> Signed-off-by: Shiraz Saleem <shiraz.saleem@intel.com> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/hw/i40iw/i40iw.h')
-rw-r--r--drivers/infiniband/hw/i40iw/i40iw.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/infiniband/hw/i40iw/i40iw.h b/drivers/infiniband/hw/i40iw/i40iw.h
index b738acdb9b02..882f3ef2e4c7 100644
--- a/drivers/infiniband/hw/i40iw/i40iw.h
+++ b/drivers/infiniband/hw/i40iw/i40iw.h
@@ -232,7 +232,7 @@ struct i40iw_device {
struct i40e_client *client;
struct i40iw_hw hw;
struct i40iw_cm_core cm_core;
- unsigned long *mem_resources;
+ u8 *mem_resources;
unsigned long *allocated_qps;
unsigned long *allocated_cqs;
unsigned long *allocated_mrs;