* [dhowells-fs:fscache-iter 41/61] fs/fscache/cookie.c:504 __fscache_invalidate() warn: inconsistent returns 'cookie->lock'.
@ 2020-05-23 3:24 kbuild test robot
0 siblings, 0 replies; 3+ messages in thread
From: kbuild test robot @ 2020-05-23 3:24 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 6164 bytes --]
CC: kbuild-all(a)lists.01.org
TO: David Howells <dhowells@redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head: 59f33c90ef6c1a75d4af75e5f60d98c0d965b6a2
commit: 4d15b33ef7e1f76b879588e3104e5cc83299f229 [41/61] fscache, cachefiles: Rewrite invalidation
:::::: branch date: 9 days ago
:::::: commit date: 9 days ago
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git checkout 4d15b33ef7e1f76b879588e3104e5cc83299f229
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/fscache/cookie.c:504 __fscache_invalidate() warn: inconsistent returns 'cookie->lock'.
Old smatch warnings:
fs/fscache/cookie.c:416 fscache_attach_object() warn: argument 2 to %lx specifier is cast from pointer
fs/fscache/cookie.c:416 fscache_attach_object() warn: argument 3 to %lx specifier is cast from pointer
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=4d15b33ef7e1f76b879588e3104e5cc83299f229
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git remote update dhowells-fs
git checkout 4d15b33ef7e1f76b879588e3104e5cc83299f229
vim +504 fs/fscache/cookie.c
ccc4fc3d11e914 David Howells 2009-04-03 473
ef778e7ae67cd4 David Howells 2012-12-20 474 /*
4d15b33ef7e1f7 David Howells 2020-02-06 475 * Invalidate an object.
ef778e7ae67cd4 David Howells 2012-12-20 476 */
4d15b33ef7e1f7 David Howells 2020-02-06 477 void __fscache_invalidate(struct fscache_cookie *cookie,
4d15b33ef7e1f7 David Howells 2020-02-06 478 const void *aux_data, loff_t new_size,
4d15b33ef7e1f7 David Howells 2020-02-06 479 unsigned int flags)
ef778e7ae67cd4 David Howells 2012-12-20 480 {
4d15b33ef7e1f7 David Howells 2020-02-06 481 struct fscache_object *object = NULL;
4d15b33ef7e1f7 David Howells 2020-02-06 482
fc9bade4eccbd7 David Howells 2020-02-06 483 _enter("{%s}", cookie->type_name);
ef778e7ae67cd4 David Howells 2012-12-20 484
ef778e7ae67cd4 David Howells 2012-12-20 485 fscache_stat(&fscache_n_invalidates);
ef778e7ae67cd4 David Howells 2012-12-20 486
ef778e7ae67cd4 David Howells 2012-12-20 487 /* Only permit invalidation of data files. Invalidating an index will
ef778e7ae67cd4 David Howells 2012-12-20 488 * require the caller to release all its attachments to the tree rooted
ef778e7ae67cd4 David Howells 2012-12-20 489 * there, and if it's doing that, it may as well just retire the
ef778e7ae67cd4 David Howells 2012-12-20 490 * cookie.
ef778e7ae67cd4 David Howells 2012-12-20 491 */
c7444f2954ac78 David Howells 2020-05-02 492 ASSERTCMP(cookie->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
ef778e7ae67cd4 David Howells 2012-12-20 493
13e34f199ebd59 David Howells 2020-02-06 494 spin_lock(&cookie->lock);
4d15b33ef7e1f7 David Howells 2020-02-06 495 fscache_update_aux(cookie, aux_data, &new_size);
13e34f199ebd59 David Howells 2020-02-06 496 cookie->zero_point = new_size;
4d15b33ef7e1f7 David Howells 2020-02-06 497
4d15b33ef7e1f7 David Howells 2020-02-06 498 if (!hlist_empty(&cookie->backing_objects)) {
4d15b33ef7e1f7 David Howells 2020-02-06 499 object = hlist_entry(cookie->backing_objects.first,
4d15b33ef7e1f7 David Howells 2020-02-06 500 struct fscache_object, cookie_link);
4d15b33ef7e1f7 David Howells 2020-02-06 501 object->inval_counter++;
4d15b33ef7e1f7 David Howells 2020-02-06 502 }
4d15b33ef7e1f7 David Howells 2020-02-06 503
4d15b33ef7e1f7 David Howells 2020-02-06 @504 switch (cookie->stage) {
4d15b33ef7e1f7 David Howells 2020-02-06 505 case FSCACHE_COOKIE_STAGE_QUIESCENT:
4d15b33ef7e1f7 David Howells 2020-02-06 506 case FSCACHE_COOKIE_STAGE_DEAD:
4d15b33ef7e1f7 David Howells 2020-02-06 507 case FSCACHE_COOKIE_STAGE_INITIALISING: /* Assume later checks will catch it */
4d15b33ef7e1f7 David Howells 2020-02-06 508 case FSCACHE_COOKIE_STAGE_INVALIDATING: /* is_still_valid will catch it */
4d15b33ef7e1f7 David Howells 2020-02-06 509 spin_unlock(&cookie->lock);
4d15b33ef7e1f7 David Howells 2020-02-06 510 _leave(" [no %u]", cookie->stage);
4d15b33ef7e1f7 David Howells 2020-02-06 511 return;
4d15b33ef7e1f7 David Howells 2020-02-06 512
4d15b33ef7e1f7 David Howells 2020-02-06 513 case FSCACHE_COOKIE_STAGE_LOOKING_UP:
4d15b33ef7e1f7 David Howells 2020-02-06 514 _leave(" [look %x]", object->inval_counter);
4d15b33ef7e1f7 David Howells 2020-02-06 515 return;
4d15b33ef7e1f7 David Howells 2020-02-06 516
4d15b33ef7e1f7 David Howells 2020-02-06 517 case FSCACHE_COOKIE_STAGE_NO_DATA_YET:
4d15b33ef7e1f7 David Howells 2020-02-06 518 case FSCACHE_COOKIE_STAGE_ACTIVE:
4d15b33ef7e1f7 David Howells 2020-02-06 519 cookie->stage = FSCACHE_COOKIE_STAGE_INVALIDATING;
4d15b33ef7e1f7 David Howells 2020-02-06 520 wake_up_var(&cookie->stage);
4d15b33ef7e1f7 David Howells 2020-02-06 521
4d15b33ef7e1f7 David Howells 2020-02-06 522 atomic_inc(&cookie->n_ops);
4d15b33ef7e1f7 David Howells 2020-02-06 523 object->cache->ops->grab_object(object, fscache_obj_get_inval);
13e34f199ebd59 David Howells 2020-02-06 524 spin_unlock(&cookie->lock);
13e34f199ebd59 David Howells 2020-02-06 525
4d15b33ef7e1f7 David Howells 2020-02-06 526 fscache_dispatch(cookie, object, flags, fscache_invalidate_object);
4d15b33ef7e1f7 David Howells 2020-02-06 527 _leave(" [inv]");
4d15b33ef7e1f7 David Howells 2020-02-06 528 return;
4d15b33ef7e1f7 David Howells 2020-02-06 529 }
ef778e7ae67cd4 David Howells 2012-12-20 530 }
ef778e7ae67cd4 David Howells 2012-12-20 531 EXPORT_SYMBOL(__fscache_invalidate);
ef778e7ae67cd4 David Howells 2012-12-20 532
---
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: 72434 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dhowells-fs:fscache-iter 41/61] fs/fscache/cookie.c:504 __fscache_invalidate() warn: inconsistent returns 'cookie->lock'.
@ 2020-05-23 8:11 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-05-23 8:11 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 5539 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head: 59f33c90ef6c1a75d4af75e5f60d98c0d965b6a2
commit: 4d15b33ef7e1f76b879588e3104e5cc83299f229 [41/61] fscache, cachefiles: Rewrite invalidation
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git checkout 4d15b33ef7e1f76b879588e3104e5cc83299f229
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/fscache/cookie.c:504 __fscache_invalidate() warn: inconsistent returns 'cookie->lock'.
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=4d15b33ef7e1f76b879588e3104e5cc83299f229
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git remote update dhowells-fs
git checkout 4d15b33ef7e1f76b879588e3104e5cc83299f229
vim +504 fs/fscache/cookie.c
4d15b33ef7e1f7 David Howells 2020-02-06 477 void __fscache_invalidate(struct fscache_cookie *cookie,
4d15b33ef7e1f7 David Howells 2020-02-06 478 const void *aux_data, loff_t new_size,
4d15b33ef7e1f7 David Howells 2020-02-06 479 unsigned int flags)
ef778e7ae67cd4 David Howells 2012-12-20 480 {
4d15b33ef7e1f7 David Howells 2020-02-06 481 struct fscache_object *object = NULL;
4d15b33ef7e1f7 David Howells 2020-02-06 482
fc9bade4eccbd7 David Howells 2020-02-06 483 _enter("{%s}", cookie->type_name);
ef778e7ae67cd4 David Howells 2012-12-20 484
ef778e7ae67cd4 David Howells 2012-12-20 485 fscache_stat(&fscache_n_invalidates);
ef778e7ae67cd4 David Howells 2012-12-20 486
ef778e7ae67cd4 David Howells 2012-12-20 487 /* Only permit invalidation of data files. Invalidating an index will
ef778e7ae67cd4 David Howells 2012-12-20 488 * require the caller to release all its attachments to the tree rooted
ef778e7ae67cd4 David Howells 2012-12-20 489 * there, and if it's doing that, it may as well just retire the
ef778e7ae67cd4 David Howells 2012-12-20 490 * cookie.
ef778e7ae67cd4 David Howells 2012-12-20 491 */
c7444f2954ac78 David Howells 2020-05-02 492 ASSERTCMP(cookie->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
ef778e7ae67cd4 David Howells 2012-12-20 493
13e34f199ebd59 David Howells 2020-02-06 494 spin_lock(&cookie->lock);
4d15b33ef7e1f7 David Howells 2020-02-06 495 fscache_update_aux(cookie, aux_data, &new_size);
13e34f199ebd59 David Howells 2020-02-06 496 cookie->zero_point = new_size;
4d15b33ef7e1f7 David Howells 2020-02-06 497
4d15b33ef7e1f7 David Howells 2020-02-06 498 if (!hlist_empty(&cookie->backing_objects)) {
4d15b33ef7e1f7 David Howells 2020-02-06 499 object = hlist_entry(cookie->backing_objects.first,
4d15b33ef7e1f7 David Howells 2020-02-06 500 struct fscache_object, cookie_link);
4d15b33ef7e1f7 David Howells 2020-02-06 501 object->inval_counter++;
4d15b33ef7e1f7 David Howells 2020-02-06 502 }
4d15b33ef7e1f7 David Howells 2020-02-06 503
4d15b33ef7e1f7 David Howells 2020-02-06 @504 switch (cookie->stage) {
^^^^^^^^^^^^^
4d15b33ef7e1f7 David Howells 2020-02-06 505 case FSCACHE_COOKIE_STAGE_QUIESCENT:
4d15b33ef7e1f7 David Howells 2020-02-06 506 case FSCACHE_COOKIE_STAGE_DEAD:
4d15b33ef7e1f7 David Howells 2020-02-06 507 case FSCACHE_COOKIE_STAGE_INITIALISING: /* Assume later checks will catch it */
4d15b33ef7e1f7 David Howells 2020-02-06 508 case FSCACHE_COOKIE_STAGE_INVALIDATING: /* is_still_valid will catch it */
4d15b33ef7e1f7 David Howells 2020-02-06 509 spin_unlock(&cookie->lock);
4d15b33ef7e1f7 David Howells 2020-02-06 510 _leave(" [no %u]", cookie->stage);
4d15b33ef7e1f7 David Howells 2020-02-06 511 return;
4d15b33ef7e1f7 David Howells 2020-02-06 512
4d15b33ef7e1f7 David Howells 2020-02-06 513 case FSCACHE_COOKIE_STAGE_LOOKING_UP:
4d15b33ef7e1f7 David Howells 2020-02-06 514 _leave(" [look %x]", object->inval_counter);
drop the lock here?
4d15b33ef7e1f7 David Howells 2020-02-06 515 return;
4d15b33ef7e1f7 David Howells 2020-02-06 516
4d15b33ef7e1f7 David Howells 2020-02-06 517 case FSCACHE_COOKIE_STAGE_NO_DATA_YET:
4d15b33ef7e1f7 David Howells 2020-02-06 518 case FSCACHE_COOKIE_STAGE_ACTIVE:
4d15b33ef7e1f7 David Howells 2020-02-06 519 cookie->stage = FSCACHE_COOKIE_STAGE_INVALIDATING;
4d15b33ef7e1f7 David Howells 2020-02-06 520 wake_up_var(&cookie->stage);
4d15b33ef7e1f7 David Howells 2020-02-06 521
4d15b33ef7e1f7 David Howells 2020-02-06 522 atomic_inc(&cookie->n_ops);
4d15b33ef7e1f7 David Howells 2020-02-06 523 object->cache->ops->grab_object(object, fscache_obj_get_inval);
13e34f199ebd59 David Howells 2020-02-06 524 spin_unlock(&cookie->lock);
13e34f199ebd59 David Howells 2020-02-06 525
4d15b33ef7e1f7 David Howells 2020-02-06 526 fscache_dispatch(cookie, object, flags, fscache_invalidate_object);
4d15b33ef7e1f7 David Howells 2020-02-06 527 _leave(" [inv]");
4d15b33ef7e1f7 David Howells 2020-02-06 528 return;
4d15b33ef7e1f7 David Howells 2020-02-06 529 }
ef778e7ae67cd4 David Howells 2012-12-20 530 }
---
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: 72434 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* [dhowells-fs:fscache-iter 41/61] fs/fscache/cookie.c:504 __fscache_invalidate() warn: inconsistent returns 'cookie->lock'.
@ 2020-05-23 8:11 ` Dan Carpenter
0 siblings, 0 replies; 3+ messages in thread
From: Dan Carpenter @ 2020-05-23 8:11 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 5539 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-iter
head: 59f33c90ef6c1a75d4af75e5f60d98c0d965b6a2
commit: 4d15b33ef7e1f76b879588e3104e5cc83299f229 [41/61] fscache, cachefiles: Rewrite invalidation
config: i386-allyesconfig (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
reproduce (this is a W=1 build):
git checkout 4d15b33ef7e1f76b879588e3104e5cc83299f229
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
New smatch warnings:
fs/fscache/cookie.c:504 __fscache_invalidate() warn: inconsistent returns 'cookie->lock'.
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=4d15b33ef7e1f76b879588e3104e5cc83299f229
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git remote update dhowells-fs
git checkout 4d15b33ef7e1f76b879588e3104e5cc83299f229
vim +504 fs/fscache/cookie.c
4d15b33ef7e1f7 David Howells 2020-02-06 477 void __fscache_invalidate(struct fscache_cookie *cookie,
4d15b33ef7e1f7 David Howells 2020-02-06 478 const void *aux_data, loff_t new_size,
4d15b33ef7e1f7 David Howells 2020-02-06 479 unsigned int flags)
ef778e7ae67cd4 David Howells 2012-12-20 480 {
4d15b33ef7e1f7 David Howells 2020-02-06 481 struct fscache_object *object = NULL;
4d15b33ef7e1f7 David Howells 2020-02-06 482
fc9bade4eccbd7 David Howells 2020-02-06 483 _enter("{%s}", cookie->type_name);
ef778e7ae67cd4 David Howells 2012-12-20 484
ef778e7ae67cd4 David Howells 2012-12-20 485 fscache_stat(&fscache_n_invalidates);
ef778e7ae67cd4 David Howells 2012-12-20 486
ef778e7ae67cd4 David Howells 2012-12-20 487 /* Only permit invalidation of data files. Invalidating an index will
ef778e7ae67cd4 David Howells 2012-12-20 488 * require the caller to release all its attachments to the tree rooted
ef778e7ae67cd4 David Howells 2012-12-20 489 * there, and if it's doing that, it may as well just retire the
ef778e7ae67cd4 David Howells 2012-12-20 490 * cookie.
ef778e7ae67cd4 David Howells 2012-12-20 491 */
c7444f2954ac78 David Howells 2020-05-02 492 ASSERTCMP(cookie->type, !=, FSCACHE_COOKIE_TYPE_INDEX);
ef778e7ae67cd4 David Howells 2012-12-20 493
13e34f199ebd59 David Howells 2020-02-06 494 spin_lock(&cookie->lock);
4d15b33ef7e1f7 David Howells 2020-02-06 495 fscache_update_aux(cookie, aux_data, &new_size);
13e34f199ebd59 David Howells 2020-02-06 496 cookie->zero_point = new_size;
4d15b33ef7e1f7 David Howells 2020-02-06 497
4d15b33ef7e1f7 David Howells 2020-02-06 498 if (!hlist_empty(&cookie->backing_objects)) {
4d15b33ef7e1f7 David Howells 2020-02-06 499 object = hlist_entry(cookie->backing_objects.first,
4d15b33ef7e1f7 David Howells 2020-02-06 500 struct fscache_object, cookie_link);
4d15b33ef7e1f7 David Howells 2020-02-06 501 object->inval_counter++;
4d15b33ef7e1f7 David Howells 2020-02-06 502 }
4d15b33ef7e1f7 David Howells 2020-02-06 503
4d15b33ef7e1f7 David Howells 2020-02-06 @504 switch (cookie->stage) {
^^^^^^^^^^^^^
4d15b33ef7e1f7 David Howells 2020-02-06 505 case FSCACHE_COOKIE_STAGE_QUIESCENT:
4d15b33ef7e1f7 David Howells 2020-02-06 506 case FSCACHE_COOKIE_STAGE_DEAD:
4d15b33ef7e1f7 David Howells 2020-02-06 507 case FSCACHE_COOKIE_STAGE_INITIALISING: /* Assume later checks will catch it */
4d15b33ef7e1f7 David Howells 2020-02-06 508 case FSCACHE_COOKIE_STAGE_INVALIDATING: /* is_still_valid will catch it */
4d15b33ef7e1f7 David Howells 2020-02-06 509 spin_unlock(&cookie->lock);
4d15b33ef7e1f7 David Howells 2020-02-06 510 _leave(" [no %u]", cookie->stage);
4d15b33ef7e1f7 David Howells 2020-02-06 511 return;
4d15b33ef7e1f7 David Howells 2020-02-06 512
4d15b33ef7e1f7 David Howells 2020-02-06 513 case FSCACHE_COOKIE_STAGE_LOOKING_UP:
4d15b33ef7e1f7 David Howells 2020-02-06 514 _leave(" [look %x]", object->inval_counter);
drop the lock here?
4d15b33ef7e1f7 David Howells 2020-02-06 515 return;
4d15b33ef7e1f7 David Howells 2020-02-06 516
4d15b33ef7e1f7 David Howells 2020-02-06 517 case FSCACHE_COOKIE_STAGE_NO_DATA_YET:
4d15b33ef7e1f7 David Howells 2020-02-06 518 case FSCACHE_COOKIE_STAGE_ACTIVE:
4d15b33ef7e1f7 David Howells 2020-02-06 519 cookie->stage = FSCACHE_COOKIE_STAGE_INVALIDATING;
4d15b33ef7e1f7 David Howells 2020-02-06 520 wake_up_var(&cookie->stage);
4d15b33ef7e1f7 David Howells 2020-02-06 521
4d15b33ef7e1f7 David Howells 2020-02-06 522 atomic_inc(&cookie->n_ops);
4d15b33ef7e1f7 David Howells 2020-02-06 523 object->cache->ops->grab_object(object, fscache_obj_get_inval);
13e34f199ebd59 David Howells 2020-02-06 524 spin_unlock(&cookie->lock);
13e34f199ebd59 David Howells 2020-02-06 525
4d15b33ef7e1f7 David Howells 2020-02-06 526 fscache_dispatch(cookie, object, flags, fscache_invalidate_object);
4d15b33ef7e1f7 David Howells 2020-02-06 527 _leave(" [inv]");
4d15b33ef7e1f7 David Howells 2020-02-06 528 return;
4d15b33ef7e1f7 David Howells 2020-02-06 529 }
ef778e7ae67cd4 David Howells 2012-12-20 530 }
---
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: 72434 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-05-23 8:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-23 3:24 [dhowells-fs:fscache-iter 41/61] fs/fscache/cookie.c:504 __fscache_invalidate() warn: inconsistent returns 'cookie->lock' kbuild test robot
2020-05-23 8:11 Dan Carpenter
2020-05-23 8:11 ` 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.