-stable review patch. If anyone has any objections, please let us know.
---------------------
From: Herbert Xu <herbert@gondor.apana.org.au>
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>
---
net/ipv4/ipcomp.c | 5 ++++-
net/ipv6/ipcomp6.c | 2 ++
2 files changed, 6 insertions(+), 1 deletion(-)
--- a/net/ipv4/ipcomp.c
+++ b/net/ipv4/ipcomp.c
@@ -108,8 +108,11 @@ static int ipcomp_compress(struct xfrm_s
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;
--- a/net/ipv6/ipcomp6.c
+++ b/net/ipv6/ipcomp6.c
@@ -146,7 +146,9 @@ static int ipcomp6_output(struct xfrm_st
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;
--
--
| Amit K. Arora | [RFC] Heads up on sys_fallocate() |
| Jan Engelhardt | Re: Linux 2.6.21-rc4 |
| Alexey Dobriyan | ext2 reservations (Re: -mm merge plans for 2.6.23) |
| Linus Torvalds | Linux 2.6.27 |
git: | |
| Joakim Tjernlund | git-svn set-tree bug |
| Anatoly Yakovenko | GIT_SSL_NO_VERIFY=1 over http doesn't ignore a different ip address for the signed... |
| Benoit Sigoure | Re: Rebase/cherry-picking idea |
| Sam Song | Fwd: [OT] Re: Git via a proxy server? |
| Theo de Raadt | That whole "Linux stealing our code" thing |
| Richard Stallman | Re: Real men don't attack straw men |
| Marcos Laufer | dmesg IBM x3650 OpenBSD 4.3 |
| Richard Stallman | Real men don't attack straw men |
| Marcel Holtmann | Bluetooth fixes for 2.6.27 |
| Linus Torvalds | Re: tcp bw in 2.6 |
| Theodore Tso | Re: [bug?] tg3: Failed to load firmware "tigon/tg3_tso.bin" |
| Johannes Berg | Re: [PATCH] mac80211: rewrite fragmentation code |
| How to make my PCIE ATA storage device running in Linux | 2 hours ago | Linux general |
| sata/ide timeout errors on asus server-mb | 5 hours ago | Linux kernel |
| Shared swap partition | 6 hours ago | Linux general |
| usb mic not detected | 10 hours ago | Applications and Utilities |
| Problem in Inserting a module | 11 hours ago | Linux kernel |
| Treason Uncloaked | 16 hours ago | Linux kernel |
| high memory | 2 days ago | Linux kernel |
| semaphore access speed | 3 days ago | Applications and Utilities |
| the kernel how to power off the machine | 3 days ago | Linux kernel |
| Easter Eggs in windows XP | 3 days ago | Windows |
