From: David Howells <dhowells@redhat.com>
To: wharms@bfs.de
Cc: dhowells@redhat.com, colin.king@canonical.com, joe@perches.com,
jaltman@auristor.com, linux-afs@lists.infradead.org,
kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2/2] afs: Fix afs_xattr_get_yfs() to not try freeing an error value
Date: Sun, 12 May 2019 19:10:45 +0100 [thread overview]
Message-ID: <31808.1557684645@warthog.procyon.org.uk> (raw)
In-Reply-To: <5CD844B0.5060206@bfs.de>
walter harms <wharms@bfs.de> wrote:
> > + ret = dsize;
> > + if (size > 0) {
> > + if (dsize > size) {
> > + ret = -ERANGE;
> > + goto error_key;
> > }
> > + memcpy(buffer, data, dsize);
> > }
> >
>
> i am confused: if size is <= 0 then the error is in dsize ?
See this bit, before that hunk:
> + if (ret < 0)
> + goto error_key;
David
next prev parent reply other threads:[~2019-05-12 18:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-12 7:45 [PATCH 1/2] afs: Fix incorrect error handling in afs_xattr_get_acl() David Howells
2019-05-12 7:45 ` [PATCH 2/2] afs: Fix afs_xattr_get_yfs() to not try freeing an error value David Howells
2019-05-12 16:07 ` walter harms
2019-05-12 18:10 ` David Howells [this message]
2019-05-12 18:44 ` walter harms
2019-05-12 20:06 ` David Howells
2019-05-13 10:13 ` walter harms
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=31808.1557684645@warthog.procyon.org.uk \
--to=dhowells@redhat.com \
--cc=colin.king@canonical.com \
--cc=jaltman@auristor.com \
--cc=joe@perches.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-afs@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=wharms@bfs.de \
/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