From 23a75eee070f1370bee803a34f285cf81eb5f331 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Szilveszter=20=C3=96rd=C3=B6g?= Date: Fri, 6 Aug 2010 09:26:38 +0800 Subject: [PATCH] crypto: hash - Fix handling of small unaligned buffers MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If a scatterwalk chain contains an entry with an unaligned offset then hash_walk_next() will cut off the next step at the next alignment point. However, if the entry ends before the next alignment point then we a loop, which leads to a kernel oops. Fix this by checking whether the next aligment point is before the end of the current entry. Signed-off-by: Szilveszter Ördög Acked-by: David S. Miller Signed-off-by: Herbert Xu --- Reading git-format-patch failed