diff options
author | Colin Ian King | 2017-11-30 15:23:54 +0100 |
---|---|---|
committer | Herbert Xu | 2017-12-11 12:36:59 +0100 |
commit | df807a19957c2917fd5a4f5812e240a250066742 (patch) | |
tree | 851d88732e8afeb4afbedf8f41247be98ce876e5 /drivers/crypto/chelsio/chcr_ipsec.c | |
parent | chcr: remove unused variables net_device, pi, adap and cntrl (diff) | |
download | kernel-qcow2-linux-df807a19957c2917fd5a4f5812e240a250066742.tar.gz kernel-qcow2-linux-df807a19957c2917fd5a4f5812e240a250066742.tar.xz kernel-qcow2-linux-df807a19957c2917fd5a4f5812e240a250066742.zip |
chcr: ensure cntrl is initialized to fix bit-wise or'ing of garabage data
In the case where skb->ip_summed != CHECKSUM_PARTIAL then cntrl contains
garbage value and this is possibly being bit-wise or'd and stored into
cpl->ctrl1. Fix this by initializing cntrl to zero.
Cleans up clang warning:
drivers/crypto/chelsio/chcr_ipsec.c:374:9: warning: The left expression
of the compound assignment is an uninitialized value. The computed value
will also be garbage
Fixes: 6dad4e8ab3ec ("chcr: Add support for Inline IPSec")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/chelsio/chcr_ipsec.c')
-rw-r--r-- | drivers/crypto/chelsio/chcr_ipsec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/crypto/chelsio/chcr_ipsec.c b/drivers/crypto/chelsio/chcr_ipsec.c index a0f003ffd1f4..64a030f8fb21 100644 --- a/drivers/crypto/chelsio/chcr_ipsec.c +++ b/drivers/crypto/chelsio/chcr_ipsec.c @@ -350,7 +350,7 @@ inline void *copy_cpltx_pktxt(struct sk_buff *skb, struct port_info *pi; struct sge_eth_txq *q; struct cpl_tx_pkt_core *cpl; - u64 cntrl; + u64 cntrl = 0; u32 ctrl0, qidx; pi = netdev_priv(dev); |