Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 86486
b: refs/heads/master
c: 21e4318
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu authored and David S. Miller committed Feb 28, 2008
1 parent 47ff0d6 commit f272c57
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60717f7e761ca04925d17e90e556e689ab134cdc
refs/heads/master: 21e43188f272c7fd9efc84b8244c0b1dfccaa105
5 changes: 4 additions & 1 deletion trunk/net/ipv4/ipcomp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions trunk/net/ipv6/ipcomp6.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f272c57

Please sign in to comment.