All of lore.kernel.org
 help / color / mirror / Atom feed
* [dhowells-fs:fscache-iter-2 51/75] fs/cachefiles/namei.c:295 cachefiles_create_file() warn: signedness bug returning '(-4095)'
@ 2021-09-10 12:56 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2021-09-10 12:54 UTC (permalink / raw)
  To: kbuild

[-- Attachment #1: Type: text/plain, Size: 2676 bytes --]

CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: David Howells <dhowells@redhat.com>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter-2
head:   7c7521adffeb04466a42e8e1956353b9d9038d02
commit: 8a939333f451cb4296510d0c9783edf1b915ad9e [51/75] cachefiles: Rearrange file lookup/creation/check to simplify
:::::: branch date: 21 hours ago
:::::: commit date: 9 weeks ago
config: i386-randconfig-m021-20210910 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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>

smatch warnings:
fs/cachefiles/namei.c:295 cachefiles_create_file() warn: signedness bug returning '(-4095)'

vim +295 fs/cachefiles/namei.c

9ae326a69004de David Howells 2009-04-03  278  
9ae326a69004de David Howells 2009-04-03  279  /*
8a939333f451cb David Howells 2021-06-09  280   * Create a new file.
9ae326a69004de David Howells 2009-04-03  281   */
8a939333f451cb David Howells 2021-06-09  282  static bool cachefiles_create_file(struct cachefiles_object *object)
9ae326a69004de David Howells 2009-04-03  283  {
8a939333f451cb David Howells 2021-06-09  284  	struct file *file;
c8e2ee13a8662a David Howells 2021-05-20  285  	int ret;
9ae326a69004de David Howells 2009-04-03  286  
8a939333f451cb David Howells 2021-06-09  287  	fscache_cookie_lookup_negative(object->cookie);
9ae326a69004de David Howells 2009-04-03  288  
8a939333f451cb David Howells 2021-06-09  289  	ret = cachefiles_has_space(object->volume->cache, 1, 0);
c8e2ee13a8662a David Howells 2021-05-20  290  	if (ret < 0)
8a939333f451cb David Howells 2021-06-09  291  		return false;
9ae326a69004de David Howells 2009-04-03  292  
8a939333f451cb David Howells 2021-06-09  293  	file = cachefiles_create_tmpfile(object);
8a939333f451cb David Howells 2021-06-09  294  	if (IS_ERR(file))
8a939333f451cb David Howells 2021-06-09 @295  		return PTR_ERR(file);
9ae326a69004de David Howells 2009-04-03  296  
8a939333f451cb David Howells 2021-06-09  297  	set_bit(CACHEFILES_OBJECT_USING_TMPFILE, &object->flags);
8a939333f451cb David Howells 2021-06-09  298  	_debug("create -> %pD{ino=%lu}", file, file_inode(file)->i_ino);
8a939333f451cb David Howells 2021-06-09  299  	object->file = file;
8a939333f451cb David Howells 2021-06-09  300  	return true;
a18feb55769b70 David Howells 2018-04-04  301  }
9ae326a69004de David Howells 2009-04-03  302  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 35977 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dhowells-fs:fscache-iter-2 51/75] fs/cachefiles/namei.c:295 cachefiles_create_file() warn: signedness bug returning '(-4095)'
@ 2021-09-10 12:56 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-09-10 12:56 UTC (permalink / raw)
  To: kbuild, David Howells; +Cc: lkp, kbuild-all, linux-kernel

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter-2
head:   7c7521adffeb04466a42e8e1956353b9d9038d02
commit: 8a939333f451cb4296510d0c9783edf1b915ad9e [51/75] cachefiles: Rearrange file lookup/creation/check to simplify
config: i386-randconfig-m021-20210910 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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>

smatch warnings:
fs/cachefiles/namei.c:295 cachefiles_create_file() warn: signedness bug returning '(-4095)'

vim +295 fs/cachefiles/namei.c

8a939333f451cb David Howells 2021-06-09  282  static bool cachefiles_create_file(struct cachefiles_object *object)
9ae326a69004de David Howells 2009-04-03  283  {
8a939333f451cb David Howells 2021-06-09  284  	struct file *file;
c8e2ee13a8662a David Howells 2021-05-20  285  	int ret;
9ae326a69004de David Howells 2009-04-03  286  
8a939333f451cb David Howells 2021-06-09  287  	fscache_cookie_lookup_negative(object->cookie);
9ae326a69004de David Howells 2009-04-03  288  
8a939333f451cb David Howells 2021-06-09  289  	ret = cachefiles_has_space(object->volume->cache, 1, 0);
c8e2ee13a8662a David Howells 2021-05-20  290  	if (ret < 0)
8a939333f451cb David Howells 2021-06-09  291  		return false;
9ae326a69004de David Howells 2009-04-03  292  
8a939333f451cb David Howells 2021-06-09  293  	file = cachefiles_create_tmpfile(object);
8a939333f451cb David Howells 2021-06-09  294  	if (IS_ERR(file))
8a939333f451cb David Howells 2021-06-09 @295  		return PTR_ERR(file);

This should be "return false;"

9ae326a69004de David Howells 2009-04-03  296  
8a939333f451cb David Howells 2021-06-09  297  	set_bit(CACHEFILES_OBJECT_USING_TMPFILE, &object->flags);
8a939333f451cb David Howells 2021-06-09  298  	_debug("create -> %pD{ino=%lu}", file, file_inode(file)->i_ino);
8a939333f451cb David Howells 2021-06-09  299  	object->file = file;
8a939333f451cb David Howells 2021-06-09  300  	return true;
a18feb55769b70 David Howells 2018-04-04  301  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [dhowells-fs:fscache-iter-2 51/75] fs/cachefiles/namei.c:295 cachefiles_create_file() warn: signedness bug returning '(-4095)'
@ 2021-09-10 12:56 ` Dan Carpenter
  0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2021-09-10 12:56 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2269 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter-2
head:   7c7521adffeb04466a42e8e1956353b9d9038d02
commit: 8a939333f451cb4296510d0c9783edf1b915ad9e [51/75] cachefiles: Rearrange file lookup/creation/check to simplify
config: i386-randconfig-m021-20210910 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 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>

smatch warnings:
fs/cachefiles/namei.c:295 cachefiles_create_file() warn: signedness bug returning '(-4095)'

vim +295 fs/cachefiles/namei.c

8a939333f451cb David Howells 2021-06-09  282  static bool cachefiles_create_file(struct cachefiles_object *object)
9ae326a69004de David Howells 2009-04-03  283  {
8a939333f451cb David Howells 2021-06-09  284  	struct file *file;
c8e2ee13a8662a David Howells 2021-05-20  285  	int ret;
9ae326a69004de David Howells 2009-04-03  286  
8a939333f451cb David Howells 2021-06-09  287  	fscache_cookie_lookup_negative(object->cookie);
9ae326a69004de David Howells 2009-04-03  288  
8a939333f451cb David Howells 2021-06-09  289  	ret = cachefiles_has_space(object->volume->cache, 1, 0);
c8e2ee13a8662a David Howells 2021-05-20  290  	if (ret < 0)
8a939333f451cb David Howells 2021-06-09  291  		return false;
9ae326a69004de David Howells 2009-04-03  292  
8a939333f451cb David Howells 2021-06-09  293  	file = cachefiles_create_tmpfile(object);
8a939333f451cb David Howells 2021-06-09  294  	if (IS_ERR(file))
8a939333f451cb David Howells 2021-06-09 @295  		return PTR_ERR(file);

This should be "return false;"

9ae326a69004de David Howells 2009-04-03  296  
8a939333f451cb David Howells 2021-06-09  297  	set_bit(CACHEFILES_OBJECT_USING_TMPFILE, &object->flags);
8a939333f451cb David Howells 2021-06-09  298  	_debug("create -> %pD{ino=%lu}", file, file_inode(file)->i_ino);
8a939333f451cb David Howells 2021-06-09  299  	object->file = file;
8a939333f451cb David Howells 2021-06-09  300  	return true;
a18feb55769b70 David Howells 2018-04-04  301  }

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-10 12:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-10 12:54 [dhowells-fs:fscache-iter-2 51/75] fs/cachefiles/namei.c:295 cachefiles_create_file() warn: signedness bug returning '(-4095)' kernel test robot
2021-09-10 12:56 ` Dan Carpenter
2021-09-10 12:56 ` Dan Carpenter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.