diff options
author | Herbert Xu <herbert@gondor.apana.org.au> | 2008-02-28 14:23:17 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-02-28 14:23:17 -0500 |
commit | 21e43188f272c7fd9efc84b8244c0b1dfccaa105 (patch) | |
tree | ad0313f88c3abe948e5a5ec61fd404a5cbfd2972 /net/ipv6 | |
parent | 60717f7e761ca04925d17e90e556e689ab134cdc (diff) |
[IPCOMP]: Disable BH on output when using shared tfm
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>
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 b90039593a7f..e3dcfa2f436b 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) | |||
146 | scratch = *per_cpu_ptr(ipcomp6_scratches, cpu); | 146 | scratch = *per_cpu_ptr(ipcomp6_scratches, cpu); |
147 | tfm = *per_cpu_ptr(ipcd->tfms, cpu); | 147 | tfm = *per_cpu_ptr(ipcd->tfms, cpu); |
148 | 148 | ||
149 | local_bh_disable(); | ||
149 | err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); | 150 | err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); |
151 | local_bh_enable(); | ||
150 | if (err || (dlen + sizeof(*ipch)) >= plen) { | 152 | if (err || (dlen + sizeof(*ipch)) >= plen) { |
151 | put_cpu(); | 153 | put_cpu(); |
152 | goto out_ok; | 154 | goto out_ok; |