OSDN Git Service

i40iw: Change mem_resources pointer to a u8
authorShiraz Saleem <shiraz.saleem@intel.com>
Mon, 22 Aug 2016 23:09:14 +0000 (18:09 -0500)
committerDoug Ledford <dledford@redhat.com>
Tue, 23 Aug 2016 16:40:19 +0000 (12:40 -0400)
commit6c7d46fdb8165ece4b0a17fb8f0b9320dbfeffc2
treeed750a40801fa22db1a1eeef65b521f4101dbeea
parent92d27ae6b3bb3491c1685fb3ca7ae1b26d81bdf4
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>
drivers/infiniband/hw/i40iw/i40iw.h