diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2008-03-05 20:07:37 -0800 |
---|---|---|
committer | Chris Wright <chrisw@sous-sol.org> | 2008-03-24 11:47:08 -0700 |
commit | 11b47c8828d4cd1df21636719603784ec5e26067 (patch) | |
tree | dbbfcbaad71089c2baccc8008995ce03658296a5 /net/ipv6 | |
parent | 5eb4efe242d2fbd36551f6016707ee280bb30f31 (diff) |
IPCOMP: Disable BH on output when using shared tfm
Upstream commit: 21e43188f272c7fd9efc84b8244c0b1dfccaa105
Because we use shared tfm objects in order to conserve memory,
(each tfm requires 128K of vmalloc memory), BH needs to be turned
off on output as that can occur in process context.
Previously this was done implicitly by the xfrm output code.
That was lost when it became lockless. So we need to add the
BH disabling to IPComp directly.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Diffstat (limited to 'net/ipv6')
-rw-r--r-- | net/ipv6/ipcomp6.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/ipv6/ipcomp6.c b/net/ipv6/ipcomp6.c index 1c5b09f44a7..f46c38fed09 100644 --- a/net/ipv6/ipcomp6.c +++ b/net/ipv6/ipcomp6.c @@ -146,7 +146,9 @@ static int ipcomp6_output(struct xfrm_state *x, struct sk_buff *skb) scratch = *per_cpu_ptr(ipcomp6_scratches, cpu); tfm = *per_cpu_ptr(ipcd->tfms, cpu); + local_bh_disable(); err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); + local_bh_enable(); if (err || (dlen + sizeof(*ipch)) >= plen) { put_cpu(); goto out_ok; |