From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: xfs@oss.sgi.com
Subject: Re: [PATCH] XFS: Use a signed return type for suffix_kstrtoint()
Date: Tue, 22 Dec 2015 08:53:35 +1100 [thread overview]
Message-ID: <20151221215335.GX26718@dastard> (raw)
In-Reply-To: <5678468B.1040008@sandeen.net>
On Mon, Dec 21, 2015 at 12:35:55PM -0600, Eric Sandeen wrote:
> On 12/20/15 1:00 AM, SF Markus Elfring wrote:
> > From: Markus Elfring <elfring@users.sourceforge.net>
> > Date: Sun, 20 Dec 2015 07:56:36 +0100
> >
> > The return type "unsigned long" was used by the suffix_kstrtoint()
> > function even though it will eventually return a negative error code.
>
> > Improve this implementation detail by using the type "int" instead.
> >
> > This issue was detected by using the Coccinelle software.
>
> > Signed-off-by: Markus Elfring <elfring@users.sourceforge.net>
>
> yep, looks like an oversight left over from a17164e5
>
> Harmless, because callers only check for non-zero value, but still
> worth fixing.
Perhaps addressing the actual bug in that code would be a more
appropriate use of our time. i.e. the undetected integer overflow
on left shift....
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-12-21 21:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-20 7:00 [PATCH] XFS: Use a signed return type for suffix_kstrtoint() SF Markus Elfring
2015-12-21 18:35 ` Eric Sandeen
2015-12-21 21:53 ` Dave Chinner [this message]
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=20151221215335.GX26718@dastard \
--to=david@fromorbit.com \
--cc=sandeen@sandeen.net \
--cc=xfs@oss.sgi.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