From: David Howells <dhowells@redhat.com>
To: Sven Schnelle <svens@linux.ibm.com>
Cc: dhowells@redhat.com,
syzbot <syzbot+9b82859567f2e50c123e@syzkaller.appspotmail.com>,
akpm@linux-foundation.org, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, syzkaller-bugs@googlegroups.com,
Herbert Xu <herbert@gondor.apana.org.au>,
"David S. Miller" <davem@davemloft.net>,
linux-crypto@vger.kernel.org
Subject: Re: [syzbot] [mm?] WARNING in try_grab_page
Date: Wed, 26 Jul 2023 09:25:24 +0100 [thread overview]
Message-ID: <125071.1690359924@warthog.procyon.org.uk> (raw)
In-Reply-To: <yt9d8rb44cbe.fsf@linux.ibm.com>
Sven Schnelle <svens@linux.ibm.com> wrote:
> However, hash_sendmsg() also unpins via af_alg_free_sg() in the error
> path. From an API perspective, i would prefer if extract_user_to_sg()
> does the unpinning on error. Any thoughts?
In the event of an error, extract_user_to_sg() unpins only the pages it added
to the scatterlist; it doesn't unpin any pages that were already there and
doesn't free the scatterlist; it also decrements sgtable->nents so that the
caller doesn't see the pages it attempted to add, so calling af_alg_free_sg()
shouldn't hurt.
Note that the error path also frees the result, so we do need to do at least
part of it.
David
next prev parent reply other threads:[~2023-07-26 8:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-03 16:34 syzbot
2023-07-25 8:36 ` Sven Schnelle
2023-07-25 9:28 ` David Howells
2023-07-26 8:25 ` David Howells [this message]
2023-09-05 17:36 ` syzbot
[not found] <125377.1690360290@warthog.procyon.org.uk>
2023-07-26 8:31 ` syzbot
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=125071.1690359924@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=akpm@linux-foundation.org \
--cc=davem@davemloft.net \
--cc=herbert@gondor.apana.org.au \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=svens@linux.ibm.com \
--cc=syzbot+9b82859567f2e50c123e@syzkaller.appspotmail.com \
--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