[lkml]   [2007]   [Mar]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectRe: [patch 32/37] CRYPTO: api: scatterwalk_copychunks() fails to advance through scatterlist
On Sat, Mar 31, 2007 at 03:41:32AM +0200, Patrick McHardy wrote:
> > [CRYPTO] api: scatterwalk_copychunks() fails to advance through scatterlist
> This patch seems to cause some problems, I get reproducable freezes
> on the receiving system with net-2.6.22 when sending IPsec packets
> larger than the mtu (reproduced about 10 times). Reverting this
> patch seems to fix it. In a few cases the oops also occured on the
> sending system.
> Backtrace from UML (sending system):
> uml:~# ping -s 20000
> PING ( 20000(20028) bytes of data.
> BUG: soft lockup detected on CPU#0!
> Call Trace:

Indeed. That patch was buggy. Sorry for not catching this earlier.

This should fix the problem.

[CRYPTO] api: Use the right value when advancing scatterwalk_copychunks

In the scatterwalk_copychunks loop, We should be advancing by
len_this_page and not nbytes. The latter is the total length.

Signed-off-by: Herbert Xu <>

Visit Openswan at
Email: Herbert Xu ~{PmV>HI~} <>
Home Page:
PGP Key:
diff --git a/crypto/scatterwalk.c b/crypto/scatterwalk.c
index a664231..0f76175 100644
--- a/crypto/scatterwalk.c
+++ b/crypto/scatterwalk.c
@@ -91,7 +91,7 @@ void scatterwalk_copychunks(void *buf, struct scatter_walk *walk,
memcpy_dir(buf, vaddr, len_this_page, out);
scatterwalk_unmap(vaddr, out);

- scatterwalk_advance(walk, nbytes);
+ scatterwalk_advance(walk, len_this_page);

if (nbytes == len_this_page)
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at
 \ /
  Last update: 2007-03-31 04:19    [W:0.072 / U:0.160 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site