From: Stephan Mueller <smueller@chronox.de>
To: Eric Biggers <ebiggers3@gmail.com>
Cc: syzbot
<bot+ff72ab869817b6ea60bc570f638ee030f4fc73e5@syzkaller.appspotmail.com>,
davem@davemloft.net, herbert@gondor.apana.org.au,
linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: general protection fault in af_alg_free_areq_sgls
Date: Tue, 28 Nov 2017 10:10:55 +0100 [thread overview]
Message-ID: <2008707.GtIZiUutxC@tauon.chronox.de> (raw)
In-Reply-To: <20171128090252.GB23413@zzz.localdomain>
Am Dienstag, 28. November 2017, 10:02:52 CET schrieb Eric Biggers:
Hi Eric,
> ---
> crypto/af_alg.c | 13 +++++++------
> 1 file changed, 7 insertions(+), 6 deletions(-)
>
> diff --git a/crypto/af_alg.c b/crypto/af_alg.c
> index 358749c38894..415a54ced4d6 100644
> --- a/crypto/af_alg.c
> +++ b/crypto/af_alg.c
> @@ -672,14 +672,15 @@ void af_alg_free_areq_sgls(struct af_alg_async_req
> *areq) }
>
> tsgl = areq->tsgl;
> - for_each_sg(tsgl, sg, areq->tsgl_entries, i) {
> - if (!sg_page(sg))
> - continue;
> - put_page(sg_page(sg));
> - }
> + if (tsgl) {
> + for_each_sg(tsgl, sg, areq->tsgl_entries, i) {
> + if (!sg_page(sg))
> + continue;
> + put_page(sg_page(sg));
> + }
>
> - if (areq->tsgl && areq->tsgl_entries)
Why do you want to remove the check for areq->tsgl_entries? I know in the
current code that cannot happen. But it should be caught in case of a
programming error.
Thus, should we add a BUG_ON(!areq->tsgl_entries)?
Otherwise:
Reviewed-by: Stephan Mueller <smueller@chronox.de>
Ciao
Stephan
next prev parent reply other threads:[~2017-11-28 9:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <001a1140f578d9710d055efb76a9@google.com>
2017-11-28 9:02 ` Eric Biggers
2017-11-28 9:10 ` Stephan Mueller [this message]
2017-11-28 18:39 ` Eric Biggers
2017-11-29 5:23 ` Herbert Xu
2017-11-29 19:51 ` Eric Biggers
2017-11-30 7:16 ` Herbert Xu
2017-12-01 18:01 ` syzbot
2017-12-01 19:06 ` Eric Biggers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2008707.GtIZiUutxC@tauon.chronox.de \
--to=smueller@chronox.de \
--cc=bot+ff72ab869817b6ea60bc570f638ee030f4fc73e5@syzkaller.appspotmail.com \
--cc=davem@davemloft.net \
--cc=ebiggers3@gmail.com \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=syzkaller-bugs@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®