From f272c5755b8b64c6dcfa19f3d3851e5de803b7f6 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Thu, 28 Feb 2008 11:23:17 -0800 Subject: [PATCH] --- yaml --- r: 86486 b: refs/heads/master c: 21e43188f272c7fd9efc84b8244c0b1dfccaa105 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/net/ipv4/ipcomp.c | 5 ++++- trunk/net/ipv6/ipcomp6.c | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index d04c42e53008..424682d5fc27 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 60717f7e761ca04925d17e90e556e689ab134cdc +refs/heads/master: 21e43188f272c7fd9efc84b8244c0b1dfccaa105 diff --git a/trunk/net/ipv4/ipcomp.c b/trunk/net/ipv4/ipcomp.c index ae1f45fc23b9..58b60b2fb011 100644 --- a/trunk/net/ipv4/ipcomp.c +++ b/trunk/net/ipv4/ipcomp.c @@ -108,8 +108,11 @@ static int ipcomp_compress(struct xfrm_state *x, struct sk_buff *skb) const int cpu = get_cpu(); u8 *scratch = *per_cpu_ptr(ipcomp_scratches, cpu); struct crypto_comp *tfm = *per_cpu_ptr(ipcd->tfms, cpu); - int err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); + int err; + local_bh_disable(); + err = crypto_comp_compress(tfm, start, plen, scratch, &dlen); + local_bh_enable(); if (err) goto out; diff --git a/trunk/net/ipv6/ipcomp6.c b/trunk/net/ipv6/ipcomp6.c index b90039593a7f..e3dcfa2f436b 100644 --- a/trunk/net/ipv6/ipcomp6.c +++ b/trunk/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;