aboutsummaryrefslogtreecommitdiff
path: root/lib/test_overflow.c
diff options
context:
space:
mode:
authorDave Ertman <[email protected]>2021-10-04 05:15:25 -0700
committerTony Nguyen <[email protected]>2021-10-14 10:14:45 -0700
commit73e30a62b19b9fbb4e6a3465c59da186630d5f2e (patch)
tree71a7e1dbd0203207f5e49754e3bdc2680c41d249 /lib/test_overflow.c
parentff7e93219442f5ac5b2cfd33e4fe4b7d5942f957 (diff)
ice: Avoid crash from unnecessary IDA free
In the remove path, there is an attempt to free the aux_idx IDA whether it was allocated or not. This can potentially cause a crash when unloading the driver on systems that do not initialize support for RDMA. But, this free cannot be gated by the status bit for RDMA, since it is allocated if the driver detects support for RDMA at probe time, but the driver can enter into a state where RDMA is not supported after the IDA has been allocated at probe time and this would lead to a memory leak. Initialize aux_idx to an invalid value and check for a valid value when unloading to determine if an IDA free is necessary. Fixes: d25a0fc41c1f9 ("ice: Initialize RDMA support") Reported-by: Jun Miao <[email protected]> Signed-off-by: Dave Ertman <[email protected]> Tested-by: Jesse Brandeburg <[email protected]> Signed-off-by: Tony Nguyen <[email protected]>
Diffstat (limited to 'lib/test_overflow.c')
0 files changed, 0 insertions, 0 deletions