From: Dave Chinner <david@fromorbit.com>
To: Dan Carpenter <dan.carpenter@oracle.com>
Cc: xfs@oss.sgi.com, darrick.wong@oracle.com
Subject: Re: xfs: use named array initializers for log item dumping
Date: Thu, 7 Apr 2016 06:20:23 +1000 [thread overview]
Message-ID: <20160406202023.GA13574@dastard> (raw)
In-Reply-To: <20160406105657.GA30644@mwanda>
On Wed, Apr 06, 2016 at 01:56:57PM +0300, Dan Carpenter wrote:
> Hello Darrick J. Wong,
>
> The patch 5110cd82ca90: "xfs: use named array initializers for log
> item dumping" from Mar 7, 2016, leads to the following static checker
> warning:
>
> fs/xfs/xfs_log.c:2085 xlog_print_tic_res()
> error: buffer overflow 'trans_type_str' 43 <= 43
>
> fs/xfs/xfs_log.c
> 2080
> 2081 xfs_warn(mp, "xlog_write: reservation summary:");
> 2082 xfs_warn(mp, " trans type = %s (%u)",
> 2083 ((ticket->t_trans_type <= 0 ||
> 2084 ticket->t_trans_type > XFS_TRANS_TYPE_MAX) ?
> ^
> Should be >=. Why is zero invalid?
>
> 2085 "bad-trans-type" : trans_type_str[ticket->t_trans_type]),
> 2086 ticket->t_trans_type);
> 2087 xfs_warn(mp, " unit res = %d bytes",
I just pushed patches to the for-next branch (i.e. linux-next) that
remove this code.
https://git.kernel.org/cgit/linux/kernel/git/dgc/linux-xfs.git/commit/?h=for-next&id=710b1e2c2948c1e5d0499def5273ecbc6472342d
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:[~2016-04-06 20:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-06 10:56 xfs: use named array initializers for log item dumping Dan Carpenter
2016-04-06 16:44 ` Darrick J. Wong
2016-04-06 20:20 ` 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=20160406202023.GA13574@dastard \
--to=david@fromorbit.com \
--cc=dan.carpenter@oracle.com \
--cc=darrick.wong@oracle.com \
--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