linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Abdul Haleem <abdhalee@linux.vnet.ibm.com>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>
Cc: linuxppc-dev <linuxppc-dev@lists.ozlabs.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	sachinp <sachinp@linux.vnet.ibm.com>
Subject: Re: [next-20170609][bisected 4d72ba0] WARNING: CPU: 8 PID: 11043 at lib/vsprintf.c:1945 set_precision
Date: Mon, 12 Jun 2017 01:12:52 -0700	[thread overview]
Message-ID: <1497255172.3254.14.camel@perches.com> (raw)
In-Reply-To: <1497253993.15415.25.camel@abdul.in.ibm.com>

On Mon, 2017-06-12 at 13:23 +0530, Abdul Haleem wrote:
> Hi Rasmus,
> 
> With commit (4d72ba0-lib/vsprintf.c: warn about too large precisions..)
> 
> WARN_ONCE is being triggered while running trinity 
> $ git clone https://github.com/kernelslacker/trinity.git
> $ cd trinity;./configure;make 
> $ ./trinity --dangerous
> 
> Machine : Power 8 PowerVM LPAR
> gcc : version 5.2.1
> config : attached
> 
> 
> In file lib/vsprintf.c at line 1945:
> set_precision(struct printf_spec *spec, int prec)
> {
>     spec->precision = prec;
>     if (WARN_ONCE(spec->precision != prec, "precision %d too large",
> prec)) {
>         spec->precision = clamp(prec, 0, PRECISION_MAX);
>     }
> }

Presumably there should be a PATH_MAX maximum check added
to the strlen(name) in get_fs_type.

fs/filesystems.c:271

struct file_system_type *get_fs_type(const char *name)
{
	struct file_system_type *fs;
	const char *dot = strchr(name, '.');
	int len = dot ? dot - name : strlen(name);

	fs = __get_fs_type(name, len);
	if (!fs && (request_module("fs-%.*s", len, name) == 0))
		fs = __get_fs_type(name, len);

      reply	other threads:[~2017-06-12  8:19 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-12  7:53 [next-20170609][bisected 4d72ba0] WARNING: CPU: 8 PID: 11043 at lib/vsprintf.c:1945 set_precision Abdul Haleem
2017-06-12  8:12 ` Joe Perches [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=1497255172.3254.14.camel@perches.com \
    --to=joe@perches.com \
    --cc=abdhalee@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rasmusvillemoes.dk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=sachinp@linux.vnet.ibm.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;
as well as URLs for NNTP newsgroup(s).