]> git.baikalelectronics.ru Git - kernel.git/commit
net/rds: Fix error handling in rds_ib_add_one()
authorDotan Barak <dotanb@dev.mellanox.co.il>
Tue, 1 Oct 2019 17:21:02 +0000 (10:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 2 Oct 2019 16:16:57 +0000 (12:16 -0400)
commitc307dc8244bed8a773e8dc3379c390e0a97a6894
tree783d0cc21944c1e8346db9e62051418e08bc9e49
parentf3cff3346b327d278a9c14e41b9e346917c82a36
net/rds: Fix error handling in rds_ib_add_one()

rds_ibdev:ipaddr_list and rds_ibdev:conn_list are initialized
after allocation some resources such as protection domain.
If allocation of such resources fail, then these uninitialized
variables are accessed in rds_ib_dev_free() in failure path. This
can potentially crash the system. The code has been updated to
initialize these variables very early in the function.

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Sudhakar Dindukurti <sudhakar.dindukurti@oracle.com>
Acked-by: Santosh Shilimkar <santosh.shilimkar@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/rds/ib.c