* include/linux/sunrpc/svc_rdma_pcl.h:64:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
@ 2021-11-29 2:35 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-29 2:35 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 15457 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Chuck Lever <chuck.lever@oracle.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d58071a8a76d779eedab38033ae4c821c30295a5
commit: 78147ca8b4a9b6cf0e597ddd6bf17959e08376c2 svcrdma: Add a "parsed chunk list" data structure
date: 12 months ago
:::::: branch date: 4 hours ago
:::::: commit date: 12 months ago
config: x86_64-randconfig-c007-20211124 (https://download.01.org/0day-ci/archive/20211129/202111291024.H7MLdYci-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 67a1c45def8a75061203461ab0060c75c864df1c)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=78147ca8b4a9b6cf0e597ddd6bf17959e08376c2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 78147ca8b4a9b6cf0e597ddd6bf17959e08376c2
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
6 warnings generated.
drivers/clk/clk-si5341.c:667:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = si5341_encode_44_32(synth->data->regmap,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/clk-si5341.c:667:2: note: Value stored to 'err' is never read
err = si5341_encode_44_32(synth->data->regmap,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/clk-si5341.c:827:23: warning: Division by zero [clang-analyzer-core.DivideZero]
rate = *parent_rate / (r << 1);
~~~~~~~~~~~~~^~~~~~~~~~
drivers/clk/clk-si5341.c:812:6: note: Assuming 'r' is 0
if (r && !(r % rate))
^
drivers/clk/clk-si5341.c:812:8: note: Left side of '&&' is false
if (r && !(r % rate))
^
drivers/clk/clk-si5341.c:815:6: note: Assuming the condition is false
if (clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/clk-si5341.c:815:2: note: Taking false branch
if (clk_hw_get_flags(hw) & CLK_SET_RATE_PARENT) {
^
drivers/clk/clk-si5341.c:827:23: note: Division by zero
rate = *parent_rate / (r << 1);
~~~~~~~~~~~~~^~~~~~~~~~
drivers/clk/clk-si5341.c:861:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = regmap_bulk_write(output->data->regmap,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/clk/clk-si5341.c:861:2: note: Value stored to 'err' is never read
err = regmap_bulk_write(output->data->regmap,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
drivers/dma/dmatest.c:939:3: warning: Value stored to 'ret' is never read [clang-analyzer-deadcode.DeadStores]
ret = kthread_stop(thread->task);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/dma/dmatest.c:939:3: note: Value stored to 'ret' is never read
ret = kthread_stop(thread->task);
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
>> include/linux/sunrpc/svc_rdma_pcl.h:64:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
net/sunrpc/xprtrdma/svc_rdma_pcl.c:19:2: note: Loop condition is true. Entering loop body
while (!list_empty(&pcl->cl_chunks)) {
^
net/sunrpc/xprtrdma/svc_rdma_pcl.c:24:3: note: Memory is released
kfree(chunk);
^~~~~~~~~~~~
net/sunrpc/xprtrdma/svc_rdma_pcl.c:19:2: note: Loop condition is true. Entering loop body
while (!list_empty(&pcl->cl_chunks)) {
^
net/sunrpc/xprtrdma/svc_rdma_pcl.c:22:11: note: Calling 'pcl_first_chunk'
chunk = pcl_first_chunk(pcl);
^~~~~~~~~~~~~~~~~~~~
include/linux/sunrpc/svc_rdma_pcl.h:62:6: note: Assuming the condition is false
if (pcl_is_empty(pcl))
^~~~~~~~~~~~~~~~~
include/linux/sunrpc/svc_rdma_pcl.h:62:2: note: Taking false branch
if (pcl_is_empty(pcl))
^
include/linux/sunrpc/svc_rdma_pcl.h:64:9: note: Left side of '&&' is false
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:853:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/sunrpc/svc_rdma_pcl.h:64:9: note: Taking false branch
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:853:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:315:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:303:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:295:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/sunrpc/svc_rdma_pcl.h:64:9: note: Loop condition is false. Exiting loop
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:853:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:315:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:303:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:293:2: note: expanded from macro '__compiletime_assert'
do { \
^
include/linux/sunrpc/svc_rdma_pcl.h:64:2: note: Use of memory after it is freed
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
2 warnings generated.
Suppressed 2 warnings (2 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
vim +64 include/linux/sunrpc/svc_rdma_pcl.h
78147ca8b4a9b6 Chuck Lever 2020-06-22 52
78147ca8b4a9b6 Chuck Lever 2020-06-22 53 /**
78147ca8b4a9b6 Chuck Lever 2020-06-22 54 * pcl_first_chunk - Return first chunk in a parsed chunk list
78147ca8b4a9b6 Chuck Lever 2020-06-22 55 * @pcl: parsed chunk list
78147ca8b4a9b6 Chuck Lever 2020-06-22 56 *
78147ca8b4a9b6 Chuck Lever 2020-06-22 57 * Returns the first chunk in the list, or NULL if the list is empty.
78147ca8b4a9b6 Chuck Lever 2020-06-22 58 */
78147ca8b4a9b6 Chuck Lever 2020-06-22 59 static inline struct svc_rdma_chunk *
78147ca8b4a9b6 Chuck Lever 2020-06-22 60 pcl_first_chunk(const struct svc_rdma_pcl *pcl)
78147ca8b4a9b6 Chuck Lever 2020-06-22 61 {
78147ca8b4a9b6 Chuck Lever 2020-06-22 62 if (pcl_is_empty(pcl))
78147ca8b4a9b6 Chuck Lever 2020-06-22 63 return NULL;
78147ca8b4a9b6 Chuck Lever 2020-06-22 @64 return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
78147ca8b4a9b6 Chuck Lever 2020-06-22 65 ch_list);
78147ca8b4a9b6 Chuck Lever 2020-06-22 66 }
78147ca8b4a9b6 Chuck Lever 2020-06-22 67
---
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] 2+ messages in thread* include/linux/sunrpc/svc_rdma_pcl.h:64:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
@ 2021-11-27 18:35 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-11-27 18:35 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 14983 bytes --]
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Chuck Lever <chuck.lever@oracle.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: c5c17547b778975b3d83a73c8d84e8fb5ecf3ba5
commit: 78147ca8b4a9b6cf0e597ddd6bf17959e08376c2 svcrdma: Add a "parsed chunk list" data structure
date: 12 months ago
:::::: branch date: 22 hours ago
:::::: commit date: 12 months ago
config: x86_64-randconfig-c007-20211124 (https://download.01.org/0day-ci/archive/20211128/202111280230.DQRSZtYn-lkp(a)intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 67a1c45def8a75061203461ab0060c75c864df1c)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=78147ca8b4a9b6cf0e597ddd6bf17959e08376c2
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 78147ca8b4a9b6cf0e597ddd6bf17959e08376c2
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^ ~
net/9p/client.c:2153:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2153:2: note: Value stored to 'err' is never read
err = 0;
^ ~
net/9p/client.c:2184:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2184:2: note: Value stored to 'err' is never read
err = 0;
^ ~
net/9p/client.c:2214:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2214:2: note: Value stored to 'err' is never read
err = 0;
^ ~
net/9p/client.c:2247:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2247:2: note: Value stored to 'err' is never read
err = 0;
^ ~
net/9p/client.c:2281:2: warning: Value stored to 'err' is never read [clang-analyzer-deadcode.DeadStores]
err = 0;
^ ~
net/9p/client.c:2281:2: note: Value stored to 'err' is never read
err = 0;
^ ~
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
24 warnings generated.
Suppressed 24 warnings (24 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
>> include/linux/sunrpc/svc_rdma_pcl.h:64:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc]
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
net/sunrpc/xprtrdma/svc_rdma_pcl.c:19:2: note: Loop condition is true. Entering loop body
while (!list_empty(&pcl->cl_chunks)) {
^
net/sunrpc/xprtrdma/svc_rdma_pcl.c:24:3: note: Memory is released
kfree(chunk);
^~~~~~~~~~~~
net/sunrpc/xprtrdma/svc_rdma_pcl.c:19:2: note: Loop condition is true. Entering loop body
while (!list_empty(&pcl->cl_chunks)) {
^
net/sunrpc/xprtrdma/svc_rdma_pcl.c:22:11: note: Calling 'pcl_first_chunk'
chunk = pcl_first_chunk(pcl);
^~~~~~~~~~~~~~~~~~~~
include/linux/sunrpc/svc_rdma_pcl.h:62:6: note: Assuming the condition is false
if (pcl_is_empty(pcl))
^~~~~~~~~~~~~~~~~
include/linux/sunrpc/svc_rdma_pcl.h:62:2: note: Taking false branch
if (pcl_is_empty(pcl))
^
include/linux/sunrpc/svc_rdma_pcl.h:64:9: note: Left side of '&&' is false
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:853:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/sunrpc/svc_rdma_pcl.h:64:9: note: Taking false branch
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:853:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:315:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:303:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:295:3: note: expanded from macro '__compiletime_assert'
if (!(condition)) \
^
include/linux/sunrpc/svc_rdma_pcl.h:64:9: note: Loop condition is false. Exiting loop
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
include/linux/list.h:522:2: note: expanded from macro 'list_first_entry'
list_entry((ptr)->next, type, member)
^
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^
include/linux/kernel.h:853:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
note: (skipping 1 expansions in backtrace; use -fmacro-backtrace-limit=0 to see all)
include/linux/compiler_types.h:315:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
^
include/linux/compiler_types.h:303:2: note: expanded from macro '_compiletime_assert'
__compiletime_assert(condition, msg, prefix, suffix)
^
include/linux/compiler_types.h:293:2: note: expanded from macro '__compiletime_assert'
do { \
^
include/linux/sunrpc/svc_rdma_pcl.h:64:2: note: Use of memory after it is freed
return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
^
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
Suppressed 5 warnings (5 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
4 warnings generated.
Suppressed 4 warnings (4 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
3 warnings generated.
Suppressed 3 warnings (3 in non-user code).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
5 warnings generated.
net/ceph/mon_client.c:140:6: warning: Value stored to 'old_mon' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
int old_mon = monc->cur_mon;
^~~~~~~ ~~~~~~~~~~~~~
net/ceph/mon_client.c:140:6: note: Value stored to 'old_mon' during its initialization is never read
int old_mon = monc->cur_mon;
^~~~~~~ ~~~~~~~~~~~~~
vim +64 include/linux/sunrpc/svc_rdma_pcl.h
78147ca8b4a9b6 Chuck Lever 2020-06-22 52
78147ca8b4a9b6 Chuck Lever 2020-06-22 53 /**
78147ca8b4a9b6 Chuck Lever 2020-06-22 54 * pcl_first_chunk - Return first chunk in a parsed chunk list
78147ca8b4a9b6 Chuck Lever 2020-06-22 55 * @pcl: parsed chunk list
78147ca8b4a9b6 Chuck Lever 2020-06-22 56 *
78147ca8b4a9b6 Chuck Lever 2020-06-22 57 * Returns the first chunk in the list, or NULL if the list is empty.
78147ca8b4a9b6 Chuck Lever 2020-06-22 58 */
78147ca8b4a9b6 Chuck Lever 2020-06-22 59 static inline struct svc_rdma_chunk *
78147ca8b4a9b6 Chuck Lever 2020-06-22 60 pcl_first_chunk(const struct svc_rdma_pcl *pcl)
78147ca8b4a9b6 Chuck Lever 2020-06-22 61 {
78147ca8b4a9b6 Chuck Lever 2020-06-22 62 if (pcl_is_empty(pcl))
78147ca8b4a9b6 Chuck Lever 2020-06-22 63 return NULL;
78147ca8b4a9b6 Chuck Lever 2020-06-22 @64 return list_first_entry(&pcl->cl_chunks, struct svc_rdma_chunk,
78147ca8b4a9b6 Chuck Lever 2020-06-22 65 ch_list);
78147ca8b4a9b6 Chuck Lever 2020-06-22 66 }
78147ca8b4a9b6 Chuck Lever 2020-06-22 67
---
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] 2+ messages in thread
end of thread, other threads:[~2021-11-29 2:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-29 2:35 include/linux/sunrpc/svc_rdma_pcl.h:64:2: warning: Use of memory after it is freed [clang-analyzer-unix.Malloc] kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2021-11-27 18:35 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.