* [dhowells-fs:fscache-cache-2 84/84] fs/cachefiles/interface.c:113:20: warning: variable 'object' is uninitialized when used here
@ 2021-04-01 19:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-04-01 19:21 UTC (permalink / raw)
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 4054 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git fscache-cache-2
head: 8c0dade745a9bacc037c10f7fb0f1900738ebd47
commit: 8c0dade745a9bacc037c10f7fb0f1900738ebd47 [84/84] cachefiles: Overhaul index
config: arm64-randconfig-r035-20210401 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 1c268a8ff4e90a85d0e634350b1104080614cf2b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=8c0dade745a9bacc037c10f7fb0f1900738ebd47
git remote add dhowells-fs https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git fetch --no-tags dhowells-fs fscache-cache-2
git checkout 8c0dade745a9bacc037c10f7fb0f1900738ebd47
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> fs/cachefiles/interface.c:113:20: warning: variable 'object' is uninitialized when used here [-Wuninitialized]
_enter("{OBJ%x}", object->debug_id);
^~~~~~
fs/cachefiles/internal.h:334:17: note: expanded from macro '_enter'
kenter(FMT, ##__VA_ARGS__); \
^~~~~~~~~~~
fs/cachefiles/internal.h:320:65: note: expanded from macro 'kenter'
#define kenter(FMT, ...) dbgprintk("==> %s("FMT")", __func__, ##__VA_ARGS__)
^~~~~~~~~~~
fs/cachefiles/internal.h:318:46: note: expanded from macro 'dbgprintk'
printk("[%-6.6s] "FMT"\n", current->comm, ##__VA_ARGS__)
^~~~~~~~~~~
fs/cachefiles/interface.c:107:34: note: initialize the variable 'object' to silence this warning
struct cachefiles_object *object;
^
= NULL
1 warning generated.
vim +/object +113 fs/cachefiles/interface.c
101
102 /*
103 * Attempt to look up the nominated node in this cache
104 */
105 static bool cachefiles_bind_cookie(struct fscache_cookie *cookie)
106 {
107 struct cachefiles_object *object;
108 struct cachefiles_cache *cache = cookie->volume->cache->cache_priv;
109 const struct cred *saved_cred;
110 char *lookup_key;
111 bool success;
112
> 113 _enter("{OBJ%x}", object->debug_id);
114
115 object = cachefiles_alloc_object(cookie);
116 if (!object)
117 goto fail;
118
119 lookup_key = cachefiles_prepare_lookup_data(object);
120 if (!lookup_key)
121 goto fail_obj;
122
123 /* look up the key, creating any missing bits */
124 cachefiles_begin_secure(cache, &saved_cred);
125 success = cachefiles_walk_to_object(object, lookup_key);
126 cachefiles_end_secure(cache, saved_cred);
127 kfree(lookup_key);
128
129 if (!success)
130 goto fail_obj;
131
132 cookie->cache_priv = object;
133 spin_lock(&cache->object_list_lock);
134 list_add(&object->cache_link, &cache->object_list);
135 spin_unlock(&cache->object_list_lock);
136 cachefiles_attr_changed(object);
137 _leave(" = t");
138 return true;
139
140 fail_obj:
141 cachefiles_put_object(object, cachefiles_obj_put_alloc_fail);
142 fail:
143 return false;
144 }
145
---
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: 26157 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-04-01 19:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01 19:21 [dhowells-fs:fscache-cache-2 84/84] fs/cachefiles/interface.c:113:20: warning: variable 'object' is uninitialized when used here kernel test robot
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.