From 4d3e40ea8344ff02cb98ea248643ca7cdd98f56f Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 10 Dec 2013 18:04:01 -0800 Subject: [PATCH] 3.4-stable patches added patches: crypto-scatterwalk-use-sg_chain_ptr-on-chain-entries.patch --- ...lk-use-sg_chain_ptr-on-chain-entries.patch | 32 +++++++++++++++++++ queue-3.4/series | 1 + 2 files changed, 33 insertions(+) create mode 100644 queue-3.4/crypto-scatterwalk-use-sg_chain_ptr-on-chain-entries.patch diff --git a/queue-3.4/crypto-scatterwalk-use-sg_chain_ptr-on-chain-entries.patch b/queue-3.4/crypto-scatterwalk-use-sg_chain_ptr-on-chain-entries.patch new file mode 100644 index 00000000000..9c4082e93e2 --- /dev/null +++ b/queue-3.4/crypto-scatterwalk-use-sg_chain_ptr-on-chain-entries.patch @@ -0,0 +1,32 @@ +From 389a5390583a18e45bc4abd4439291abec5e7a63 Mon Sep 17 00:00:00 2001 +From: Tom Lendacky +Date: Thu, 5 Dec 2013 13:09:53 -0600 +Subject: crypto: scatterwalk - Use sg_chain_ptr on chain entries + +From: Tom Lendacky + +commit 389a5390583a18e45bc4abd4439291abec5e7a63 upstream. + +Now that scatterwalk_sg_chain sets the chain pointer bit the sg_page +call in scatterwalk_sg_next hits a BUG_ON when CONFIG_DEBUG_SG is +enabled. Use sg_chain_ptr instead of sg_page on a chain entry. + +Signed-off-by: Tom Lendacky +Signed-off-by: Herbert Xu +Signed-off-by: Greg Kroah-Hartman + +--- + include/crypto/scatterwalk.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/include/crypto/scatterwalk.h ++++ b/include/crypto/scatterwalk.h +@@ -44,7 +44,7 @@ static inline struct scatterlist *scatte + if (sg_is_last(sg)) + return NULL; + +- return (++sg)->length ? sg : (void *)sg_page(sg); ++ return (++sg)->length ? sg : sg_chain_ptr(sg); + } + + static inline void scatterwalk_crypto_chain(struct scatterlist *head, diff --git a/queue-3.4/series b/queue-3.4/series index 89c8e7b0ddc..631d47a14fc 100644 --- a/queue-3.4/series +++ b/queue-3.4/series @@ -23,3 +23,4 @@ usb-mos7840-correct-handling-of-cs5-setting.patch usb-spcp8x5-correct-handling-of-cs5-setting.patch usb-cdc-acm-added-support-for-the-lenovo-rd02-d400-usb-modem.patch drivers-char-i8k.c-add-dell-xpls-l421x.patch +crypto-scatterwalk-use-sg_chain_ptr-on-chain-entries.patch -- 2.47.3