* Re: [kbuild] fs/xfs/libxfs/xfs_bmap.c:5563 __xfs_bunmapi() warn: Function too hairy. No more merges. [not found] <202006210453.AJzaq6rh%lkp@intel.com> @ 2020-06-22 16:15 ` Darrick J. Wong 2020-06-23 8:05 ` [kbuild] " Dan Carpenter 0 siblings, 1 reply; 2+ messages in thread From: Darrick J. Wong @ 2020-06-22 16:15 UTC (permalink / raw) To: kernel test robot; +Cc: kbuild, Dan Carpenter, xfs On Sun, Jun 21, 2020 at 04:03:02AM +0800, kernel test robot wrote: > CC: kbuild-all@lists.01.org > CC: linux-kernel@vger.kernel.org > TO: Dave Chinner <dchinner@redhat.com> > CC: "Darrick J. Wong" <darrick.wong@oracle.com> > CC: Christoph Hellwig <hch@lst.de> > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > head: 4333a9b0b67bb4e8bcd91bdd80da80b0ec151162 > commit: b0dff466c00975a3e3ec97e6b0266bfd3e4805d6 xfs: separate read-only variables in struct xfs_mount > date: 3 weeks ago > :::::: branch date: 24 hours ago > :::::: commit date: 3 weeks ago > config: i386-randconfig-m021-20200621 (attached as .config) > compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 > > If you fix the issue, kindly add following tag as appropriate > Reported-by: kernel test robot <lkp@intel.com> > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > > New smatch warnings: > fs/xfs/libxfs/xfs_bmap.c:5563 __xfs_bunmapi() warn: Function too hairy. No more merges. > > Old smatch warnings: > fs/xfs/libxfs/xfs_bmap.c:5450 __xfs_bunmapi() error: we previously assumed 'tp' could be null (see line 5290) > fs/xfs/libxfs/xfs_bmap.c:6123 __xfs_bmap_add() error: potential null dereference 'bi'. (kmem_alloc returns null) Er... does this mean that smatch is smarter about kmem_alloc now? Or merely that something/someone tweaked the hair threshold downwards? <-- his personal hair threshold is much longer now that it's March 98th. --D > > # https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=b0dff466c00975a3e3ec97e6b0266bfd3e4805d6 > git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git > git remote update linus > git checkout b0dff466c00975a3e3ec97e6b0266bfd3e4805d6 > vim +5563 fs/xfs/libxfs/xfs_bmap.c <snip> a ton of git blame output ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [kbuild] Re: fs/xfs/libxfs/xfs_bmap.c:5563 __xfs_bunmapi() warn: Function too hairy. No more merges. 2020-06-22 16:15 ` [kbuild] fs/xfs/libxfs/xfs_bmap.c:5563 __xfs_bunmapi() warn: Function too hairy. No more merges Darrick J. Wong @ 2020-06-23 8:05 ` Dan Carpenter 0 siblings, 0 replies; 2+ messages in thread From: Dan Carpenter @ 2020-06-23 8:05 UTC (permalink / raw) To: Darrick J. Wong; +Cc: kernel test robot, kbuild, Dan Carpenter, xfs On Mon, Jun 22, 2020 at 09:15:32AM -0700, Darrick J. Wong wrote: > On Sun, Jun 21, 2020 at 04:03:02AM +0800, kernel test robot wrote: > > CC: kbuild-all@lists.01.org > > CC: linux-kernel@vger.kernel.org > > TO: Dave Chinner <dchinner@redhat.com> > > CC: "Darrick J. Wong" <darrick.wong@oracle.com> > > CC: Christoph Hellwig <hch@lst.de> > > > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master > > head: 4333a9b0b67bb4e8bcd91bdd80da80b0ec151162 > > commit: b0dff466c00975a3e3ec97e6b0266bfd3e4805d6 xfs: separate read-only variables in struct xfs_mount > > date: 3 weeks ago > > :::::: branch date: 24 hours ago > > :::::: commit date: 3 weeks ago > > config: i386-randconfig-m021-20200621 (attached as .config) > > compiler: gcc-9 (Debian 9.3.0-13) 9.3.0 > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot <lkp@intel.com> > > Reported-by: Dan Carpenter <dan.carpenter@oracle.com> > > > > New smatch warnings: > > fs/xfs/libxfs/xfs_bmap.c:5563 __xfs_bunmapi() warn: Function too hairy. No more merges. > > > > Old smatch warnings: > > fs/xfs/libxfs/xfs_bmap.c:5450 __xfs_bunmapi() error: we previously assumed 'tp' could be null (see line 5290) > > fs/xfs/libxfs/xfs_bmap.c:6123 __xfs_bmap_add() error: potential null dereference 'bi'. (kmem_alloc returns null) > > Er... does this mean that smatch is smarter about kmem_alloc now? > > Or merely that something/someone tweaked the hair threshold downwards? > > <-- his personal hair threshold is much longer now that it's March 98th. You must have signed up to the kbuild list. I normally look over the warnings and ignore the false positives like this one... The "Function too hairy. No more merges." message is internal stuff. I should turn that off by default. I don't normally pay a lot of attention to the old warnings but it looks like the "tp" warning is valid. On my system, I don't get the warning because the "too hairy" warning triggers to early. The __xfs_bmap_add() warning is a false positive because we don't pass KM_MAYFAIL. Smatch doesn't track set bits. It will do eventually. It's not complicated code to write but it's just a matter of doing the work. regards, dan carpenter ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-06-23 8:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202006210453.AJzaq6rh%lkp@intel.com>
2020-06-22 16:15 ` [kbuild] fs/xfs/libxfs/xfs_bmap.c:5563 __xfs_bunmapi() warn: Function too hairy. No more merges Darrick J. Wong
2020-06-23 8:05 ` [kbuild] " Dan Carpenter
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox