Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752183AbdFLIM5 (ORCPT ); Mon, 12 Jun 2017 04:12:57 -0400 Received: from smtprelay0229.hostedemail.com ([216.40.44.229]:57051 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751952AbdFLIMz (ORCPT ); Mon, 12 Jun 2017 04:12:55 -0400 X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 50,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::,RULES_HIT:41:355:379:541:599:967:973:988:989:1260:1277:1311:1313:1314:1345:1359:1373:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2525:2560:2563:2682:2685:2828:2859:2933:2937:2939:2942:2945:2947:2951:2954:3022:3138:3139:3140:3141:3142:3352:3622:3865:3867:3870:3871:3934:3936:3938:3941:3944:3947:3950:3953:3956:3959:4321:4605:5007:6119:7875:7903:8545:9025:10004:10394:10400:10471:10848:11026:11232:11658:11914:12043:12296:12740:12760:12895:13069:13255:13311:13357:13439:14096:14097:14180:14181:14659:14721:21060:21080:21451:21627:30029:30054:30070:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:1,LUA_SUMMARY:none X-HE-Tag: bun58_193f42a43440b X-Filterd-Recvd-Size: 2049 Message-ID: <1497255172.3254.14.camel@perches.com> Subject: Re: [next-20170609][bisected 4d72ba0] WARNING: CPU: 8 PID: 11043 at lib/vsprintf.c:1945 set_precision From: Joe Perches To: Abdul Haleem , Rasmus Villemoes Cc: linuxppc-dev , linux-kernel , sachinp Date: Mon, 12 Jun 2017 01:12:52 -0700 In-Reply-To: <1497253993.15415.25.camel@abdul.in.ibm.com> References: <1497253993.15415.25.camel@abdul.in.ibm.com> Content-Type: text/plain; charset="ISO-8859-1" X-Mailer: Evolution 3.22.6-1ubuntu1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1093 Lines: 40 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);