]> git.baikalelectronics.ru Git - kernel.git/commit
crypto: chelsio - remove extra allocation for chtls_dev
authorStephen Kitt <steve@sk2.org>
Fri, 24 Jan 2020 22:20:51 +0000 (23:20 +0100)
committerHerbert Xu <herbert@gondor.apana.org.au>
Sat, 22 Feb 2020 01:25:41 +0000 (09:25 +0800)
commit076c60cfa999bcc8afc62278edc818ca3f3ec45b
treeeea40f9ccc29f26f9fb6c1cf9755d3993bfcb1ea
parent00b3537a2032ea3c1b08d8f16db5cc83a1da4ee6
crypto: chelsio - remove extra allocation for chtls_dev

chtls_uld_add allocates room for info->nports net_device structs
following the chtls_dev struct, presumably because it was originally
intended that the ports array would be stored there. This is suggested
by the assignment which was present in initial versions and removed by
987f20ec00f7 ("crypto: chelsio - remove redundant assignment to
cdev->ports"):

cdev->ports = (struct net_device **)(cdev + 1);

This assignment was never used, being overwritten by lldi->ports
immediately afterwards, and I couldn't find any uses of the memory
allocated past the end of the struct.

Signed-off-by: Stephen Kitt <steve@sk2.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
drivers/crypto/chelsio/chtls/chtls_main.c