net: phy: mscc: macsec: do not copy encryption keys
authorAntoine Tenart <atenart@kernel.org>
Tue, 15 Nov 2022 15:44:51 +0000 (16:44 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Nov 2022 09:17:42 +0000 (09:17 +0000)
commit0dc33c65835d456e42de509ba17563caa6a9d4c1
treec22fa7e8a1483a7616e66811203338e10dc21aa3
parenta452d30f3f17e59a585beafd015ca826a609f549
net: phy: mscc: macsec: do not copy encryption keys

Following 1b16b3fdf675 ("net: phy: mscc: macsec: clear encryption keys when freeing a flow"),
go one step further and instead of calling memzero_explicit on the key
when freeing a flow, simply not copy the key in the first place as it's
only used when a new flow is set up.

Signed-off-by: Antoine Tenart <atenart@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mscc/mscc_macsec.c
drivers/net/phy/mscc/mscc_macsec.h