]> git.baikalelectronics.ru Git - kernel.git/commit
macsec: dynamically allocate space for sglist
authorJason A. Donenfeld <Jason@zx2c4.com>
Tue, 25 Apr 2017 17:08:18 +0000 (19:08 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Apr 2017 18:41:53 +0000 (14:41 -0400)
commit89644f0c20933093c88f8629204aaa37ef4bd302
tree52d523a44d35c124513537df45423bea4546d1a2
parent853e4dd24072a50496c5d62e913e9e252631d384
macsec: dynamically allocate space for sglist

We call skb_cow_data, which is good anyway to ensure we can actually
modify the skb as such (another error from prior). Now that we have the
number of fragments required, we can safely allocate exactly that amount
of memory.

Fixes: 4f0c7417cca8 ("macsec: introduce IEEE 802.1AE driver")
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Acked-by: Sabrina Dubroca <sd@queasysnail.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macsec.c