[tglx-devel:msi 67/101] drivers/pci/msi/msi.c:520 msix_setup_msi_descs() error: uninitialized symbol 'ret'.
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Thomas Gleixner <tglx(a)linutronix.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tglx/devel.git msi
head: 1fd2d0e8970556f4495ebc122b6e7f249393022e
commit: 865668a0262e3104a4682cef082467927b630fbf [67/101] PCI/MSI: Use msi_add_msi_desc()
:::::: branch date: 11 hours ago
:::::: commit date: 11 hours ago
config: x86_64-randconfig-m001-20211128 (https://download.01.org/0day-ci/archive/20211130/202111301651.UmAV0HXb-lk...)
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(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/pci/msi/msi.c:520 msix_setup_msi_descs() error: uninitialized symbol 'ret'.
vim +/ret +520 drivers/pci/msi/msi.c
5a05a9d819a328 drivers/pci/msi.c Hidetoshi Seto 2009-08-06 485
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 486 static int msix_setup_msi_descs(struct pci_dev *dev, void __iomem *base,
e75eafb9b0395c drivers/pci/msi.c Thomas Gleixner 2016-09-14 487 struct msix_entry *entries, int nvec,
b56b352ec3dc0a drivers/pci/msi/msi.c Thomas Gleixner 2021-11-14 488 struct irq_affinity_desc *masks)
d9d7070e611765 drivers/pci/msi.c Hidetoshi Seto 2009-08-06 489 {
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 490 int ret, i, vec_count = pci_msix_vec_count(dev);
b56b352ec3dc0a drivers/pci/msi/msi.c Thomas Gleixner 2021-11-14 491 struct irq_affinity_desc *curmsk;
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 492 struct msi_desc desc;
7d5ec3d3612396 drivers/pci/msi.c Thomas Gleixner 2021-07-29 493 void __iomem *addr;
4ef33685aa0957 drivers/pci/msi.c Christoph Hellwig 2016-07-12 494
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 495 memset(&desc, 0, sizeof(desc));
d9d7070e611765 drivers/pci/msi.c Hidetoshi Seto 2009-08-06 496
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 497 desc.nvec_used = 1;
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 498 desc.pci.msi_attrib.is_msix = 1;
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 499 desc.pci.msi_attrib.is_64 = 1;
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 500 desc.pci.msi_attrib.default_irq = dev->irq;
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 501 desc.pci.mask_base = base;
7d5ec3d3612396 drivers/pci/msi.c Thomas Gleixner 2021-07-29 502
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 503 for (i = 0, curmsk = masks; i < nvec; i++, curmsk++) {
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 504 desc.msi_index = entries ? entries[i].entry : i;
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 505 desc.affinity = masks ? curmsk : NULL;
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 506 desc.pci.msi_attrib.is_virtual = desc.msi_index >= vec_count;
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 507 desc.pci.msi_attrib.can_mask = !pci_msi_ignore_mask &&
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 508 !desc.pci.msi_attrib.is_virtual;
9c8e9c9681a0f3 drivers/pci/msi.c Thomas Gleixner 2021-11-04 509
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 510 if (!desc.pci.msi_attrib.can_mask) {
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 511 addr = pci_msix_desc_addr(&desc);
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 512 desc.pci.msix_ctrl = readl(addr + PCI_MSIX_ENTRY_VECTOR_CTRL);
b296ababcc4bbf drivers/pci/msi.c Thomas Gleixner 2021-07-29 513 }
7d5ec3d3612396 drivers/pci/msi.c Thomas Gleixner 2021-07-29 514
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 515 ret = msi_add_msi_desc(&dev->dev, &desc);
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 516 if (ret)
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 517 break;
d9d7070e611765 drivers/pci/msi.c Hidetoshi Seto 2009-08-06 518 }
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 519
865668a0262e31 drivers/pci/msi/msi.c Thomas Gleixner 2021-11-09 @520 return ret;
d9d7070e611765 drivers/pci/msi.c Hidetoshi Seto 2009-08-06 521 }
d9d7070e611765 drivers/pci/msi.c Hidetoshi Seto 2009-08-06 522
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 2 weeks
Re: [PATCH 2/5] tracing: Disable preemption when using the filter buffer
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20211130024318.880190623(a)goodmis.org>
References: <20211130024318.880190623(a)goodmis.org>
TO: Steven Rostedt <rostedt(a)goodmis.org>
TO: linux-kernel(a)vger.kernel.org
CC: Ingo Molnar <mingo(a)kernel.org>
CC: Andrew Morton <akpm(a)linux-foundation.org>
CC: Linux Memory Management List <linux-mm(a)kvack.org>
Hi Steven,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on rostedt-trace/for-next]
[also build test WARNING on linux/master hnaz-mm/master linus/master v5.16-rc3 next-20211129]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Steven-Rostedt/tracing-Various-u...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace.git for-next
:::::: branch date: 3 hours ago
:::::: commit date: 3 hours ago
config: x86_64-randconfig-s032-20211128 (https://download.01.org/0day-ci/archive/20211130/202111301454.dzbIJfyp-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/1ac91c8764ae50601cd41dceb62020560...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Steven-Rostedt/tracing-Various-updates/20211130-104342
git checkout 1ac91c8764ae50601cd41dceb620205607ab59f6
# save the config file to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash kernel/trace/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
kernel/trace/trace.c:5710:1: sparse: sparse: trying to concatenate 9583-character string (8191 bytes max)
kernel/trace/trace.c:392:28: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct trace_export **list @@ got struct trace_export [noderef] __rcu ** @@
kernel/trace/trace.c:392:28: sparse: expected struct trace_export **list
kernel/trace/trace.c:392:28: sparse: got struct trace_export [noderef] __rcu **
kernel/trace/trace.c:406:33: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct trace_export **list @@ got struct trace_export [noderef] __rcu ** @@
kernel/trace/trace.c:406:33: sparse: expected struct trace_export **list
kernel/trace/trace.c:406:33: sparse: got struct trace_export [noderef] __rcu **
>> kernel/trace/trace.c:2769:27: sparse: sparse: assignment expression in conditional
kernel/trace/trace.c:2843:38: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct event_filter *filter @@ got struct event_filter [noderef] __rcu *filter @@
kernel/trace/trace.c:2843:38: sparse: expected struct event_filter *filter
kernel/trace/trace.c:2843:38: sparse: got struct event_filter [noderef] __rcu *filter
kernel/trace/trace.c:3225:46: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got struct trace_buffer_struct * @@
kernel/trace/trace.c:3225:46: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace.c:3225:46: sparse: got struct trace_buffer_struct *
kernel/trace/trace.c:3241:9: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected void const [noderef] __percpu *__vpp_verify @@ got int * @@
kernel/trace/trace.c:3241:9: sparse: expected void const [noderef] __percpu *__vpp_verify
kernel/trace/trace.c:3241:9: sparse: got int *
kernel/trace/trace.c:3251:17: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected struct trace_buffer_struct *buffers @@ got struct trace_buffer_struct [noderef] __percpu * @@
kernel/trace/trace.c:3251:17: sparse: expected struct trace_buffer_struct *buffers
kernel/trace/trace.c:3251:17: sparse: got struct trace_buffer_struct [noderef] __percpu *
kernel/trace/trace.c:346:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/trace.c:346:9: sparse: struct trace_export [noderef] __rcu *
kernel/trace/trace.c:346:9: sparse: struct trace_export *
kernel/trace/trace.c:361:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/trace/trace.c:361:9: sparse: struct trace_export [noderef] __rcu *
kernel/trace/trace.c:361:9: sparse: struct trace_export *
vim +2769 kernel/trace/trace.c
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2736)
ccb469a198cffa Steven Rostedt 2012-08-02 2737 struct ring_buffer_event *
13292494379f92 Steven Rostedt (VMware 2019-12-13 2738) trace_event_buffer_lock_reserve(struct trace_buffer **current_rb,
7f1d2f8210195c Steven Rostedt (Red Hat 2015-05-05 2739) struct trace_event_file *trace_file,
ccb469a198cffa Steven Rostedt 2012-08-02 2740 int type, unsigned long len,
36590c50b2d072 Sebastian Andrzej Siewior 2021-01-25 2741 unsigned int trace_ctx)
ccb469a198cffa Steven Rostedt 2012-08-02 2742 {
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2743) struct ring_buffer_event *entry;
b94bc80df64823 Steven Rostedt (VMware 2021-03-16 2744) struct trace_array *tr = trace_file->tr;
0fc1b09ff1ff40 Steven Rostedt (Red Hat 2016-05-03 2745) int val;
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2746)
b94bc80df64823 Steven Rostedt (VMware 2021-03-16 2747) *current_rb = tr->array_buffer.buffer;
0fc1b09ff1ff40 Steven Rostedt (Red Hat 2016-05-03 2748)
b94bc80df64823 Steven Rostedt (VMware 2021-03-16 2749) if (!tr->no_filter_buffering_ref &&
1ac91c8764ae50 Steven Rostedt (VMware 2021-11-29 2750) (trace_file->flags & (EVENT_FILE_FL_SOFT_DISABLED | EVENT_FILE_FL_FILTERED))) {
1ac91c8764ae50 Steven Rostedt (VMware 2021-11-29 2751) preempt_disable_notrace();
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2752) /*
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2753) * Filtering is on, so try to use the per cpu buffer first.
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2754) * This buffer will simulate a ring_buffer_event,
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2755) * where the type_len is zero and the array[0] will
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2756) * hold the full length.
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2757) * (see include/linux/ring-buffer.h for details on
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2758) * how the ring_buffer_event is structured).
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2759) *
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2760) * Using a temp buffer during filtering and copying it
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2761) * on a matched filter is quicker than writing directly
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2762) * into the ring buffer and then discarding it when
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2763) * it doesn't match. That is because the discard
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2764) * requires several atomic operations to get right.
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2765) * Copying on match and doing nothing on a failed match
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2766) * is still quicker than no copy on match, but having
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2767) * to discard out of the ring buffer on a failed match.
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2768) */
1ac91c8764ae50 Steven Rostedt (VMware 2021-11-29 @2769) if (entry = __this_cpu_read(trace_buffered_event)) {
faa76a6c289f43 Steven Rostedt (VMware 2021-06-09 2770) int max_len = PAGE_SIZE - struct_size(entry, array, 1);
faa76a6c289f43 Steven Rostedt (VMware 2021-06-09 2771)
0fc1b09ff1ff40 Steven Rostedt (Red Hat 2016-05-03 2772) val = this_cpu_inc_return(trace_buffered_event_cnt);
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2773)
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2774) /*
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2775) * Preemption is disabled, but interrupts and NMIs
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2776) * can still come in now. If that happens after
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2777) * the above increment, then it will have to go
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2778) * back to the old method of allocating the event
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2779) * on the ring buffer, and if the filter fails, it
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2780) * will have to call ring_buffer_discard_commit()
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2781) * to remove it.
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2782) *
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2783) * Need to also check the unlikely case that the
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2784) * length is bigger than the temp buffer size.
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2785) * If that happens, then the reserve is pretty much
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2786) * guaranteed to fail, as the ring buffer currently
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2787) * only allows events less than a page. But that may
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2788) * change in the future, so let the ring buffer reserve
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2789) * handle the failure in that case.
8f0901cda14d3b Steven Rostedt (VMware 2021-06-09 2790) */
faa76a6c289f43 Steven Rostedt (VMware 2021-06-09 2791) if (val == 1 && likely(len <= max_len)) {
36590c50b2d072 Sebastian Andrzej Siewior 2021-01-25 2792 trace_event_setup(entry, type, trace_ctx);
0fc1b09ff1ff40 Steven Rostedt (Red Hat 2016-05-03 2793) entry->array[0] = len;
1ac91c8764ae50 Steven Rostedt (VMware 2021-11-29 2794) /* Return with preemption disabled */
0fc1b09ff1ff40 Steven Rostedt (Red Hat 2016-05-03 2795) return entry;
0fc1b09ff1ff40 Steven Rostedt (Red Hat 2016-05-03 2796) }
0fc1b09ff1ff40 Steven Rostedt (Red Hat 2016-05-03 2797) this_cpu_dec(trace_buffered_event_cnt);
0fc1b09ff1ff40 Steven Rostedt (Red Hat 2016-05-03 2798) }
1ac91c8764ae50 Steven Rostedt (VMware 2021-11-29 2799) /* __trace_buffer_lock_reserve() disables preemption */
1ac91c8764ae50 Steven Rostedt (VMware 2021-11-29 2800) preempt_enable_notrace();
1ac91c8764ae50 Steven Rostedt (VMware 2021-11-29 2801) }
0fc1b09ff1ff40 Steven Rostedt (Red Hat 2016-05-03 2802)
36590c50b2d072 Sebastian Andrzej Siewior 2021-01-25 2803 entry = __trace_buffer_lock_reserve(*current_rb, type, len,
36590c50b2d072 Sebastian Andrzej Siewior 2021-01-25 2804 trace_ctx);
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2805) /*
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2806) * If tracing is off, but we have triggers enabled
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2807) * we still need to look at the event data. Use the temp_buffer
906695e5932463 Qiujun Huang 2020-10-31 2808 * to store the trace event for the trigger to use. It's recursive
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2809) * safe and will not be recorded anywhere.
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2810) */
5d6ad960a71f0b Steven Rostedt (Red Hat 2015-05-13 2811) if (!entry && trace_file->flags & EVENT_FILE_FL_TRIGGER_COND) {
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2812) *current_rb = temp_buffer;
36590c50b2d072 Sebastian Andrzej Siewior 2021-01-25 2813 entry = __trace_buffer_lock_reserve(*current_rb, type, len,
36590c50b2d072 Sebastian Andrzej Siewior 2021-01-25 2814 trace_ctx);
ccb469a198cffa Steven Rostedt 2012-08-02 2815 }
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2816) return entry;
2c4a33aba5f9ea Steven Rostedt (Red Hat 2014-03-25 2817) }
ccb469a198cffa Steven Rostedt 2012-08-02 2818 EXPORT_SYMBOL_GPL(trace_event_buffer_lock_reserve);
ccb469a198cffa Steven Rostedt 2012-08-02 2819
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 2 weeks
drivers/media/pci/saa7134/saa7134-tvaudio.c:153:4: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Jakub Jelinek <jakub(a)redhat.com>
CC: "Peter Zijlstra (Intel)" <peterz(a)infradead.org>
CC: Andrew Morton <akpm(a)linux-foundation.org>
CC: Linux Memory Management List <linux-mm(a)kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d58071a8a76d779eedab38033ae4c821c30295a5
commit: 2f78788b55baa3410b1ec91a576286abe1ad4d6a ilog2: improve ilog2 for constant arguments
date: 12 months ago
:::::: branch date: 28 hours ago
:::::: commit date: 12 months ago
config: arm-randconfig-c002-20211124 (https://download.01.org/0day-ci/archive/20211130/202111301013.XRLbfOBt-lk...)
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
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2f78788b55baa3410b1ec91a576286abe1ad4d6a
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:277:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:298:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:298:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:391:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:391:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:406:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:406:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:415:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:415:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:426:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:426:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:440:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:440:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:470:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
drivers/media/tuners/fc2580.c:470:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = dev->client;
^~~~~~ ~~~~~~~~~~~
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
7 warnings generated.
drivers/media/pci/saa7134/saa7134-cards.c:7742:3: warning: Value stored to 'tuner_t' is never read [clang-analyzer-deadcode.DeadStores]
tuner_t = 0;
^ ~
drivers/media/pci/saa7134/saa7134-cards.c:7742:3: note: Value stored to 'tuner_t' is never read
tuner_t = 0;
^ ~
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
Suppressed 6 warnings (6 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.
10 warnings generated.
drivers/media/pci/saa7134/saa7134-tvaudio.c:52:15: warning: Excessive padding in 'struct mainscan' (8 padding bytes, where 0 is optimal).
Optimal fields order:
std,
name,
carr,
consider reordering the fields or adding explicit padding members [clang-analyzer-optin.performance.Padding]
static struct mainscan {
~~~~~~~^~~~~~~~~~
drivers/media/pci/saa7134/saa7134-tvaudio.c:52:15: note: Excessive padding in 'struct mainscan' (8 padding bytes, where 0 is optimal). Optimal fields order: std, name, carr, consider reordering the fields or adding explicit padding members
static struct mainscan {
~~~~~~~^~~~~~~~~~
>> drivers/media/pci/saa7134/saa7134-tvaudio.c:153:4: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
a <<= 24;
^
drivers/media/pci/saa7134/saa7134-tvaudio.c:321:6: note: Assuming the condition is false
if (!(dev->tvnorm->id & scan->std)) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/pci/saa7134/saa7134-tvaudio.c:321:2: note: Taking false branch
if (!(dev->tvnorm->id & scan->std)) {
^
drivers/media/pci/saa7134/saa7134-tvaudio.c:327:6: note: Assuming 'audio_debug' is <= 1
if (audio_debug > 1) {
^~~~~~~~~~~~~~~
drivers/media/pci/saa7134/saa7134-tvaudio.c:327:2: note: Taking false branch
if (audio_debug > 1) {
^
drivers/media/pci/saa7134/saa7134-tvaudio.c:344:2: note: Calling 'tvaudio_setcarrier'
tvaudio_setcarrier(dev,scan->carr-90,scan->carr-90);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/pci/saa7134/saa7134-tvaudio.c:161:6: note: Assuming the condition is true
if (-1 == secondary)
^~~~~~~~~~~~~~~
drivers/media/pci/saa7134/saa7134-tvaudio.c:161:2: note: Taking true branch
if (-1 == secondary)
^
drivers/media/pci/saa7134/saa7134-tvaudio.c:163:2: note: Loop condition is false. Exiting loop
saa_writel(SAA7134_CARRIER1_FREQ0 >> 2, tvaudio_carr2reg(primary));
^
drivers/media/pci/saa7134/saa7134.h:691:36: note: expanded from macro 'saa_writel'
#define saa_writel(reg,value) writel((value), dev->lmmio + (reg));
^
arch/arm/include/asm/io.h:307:25: note: expanded from macro 'writel'
#define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
^
arch/arm/include/asm/io.h:169:20: note: expanded from macro '__iowmb'
#define __iowmb() do { } while (0)
^
drivers/media/pci/saa7134/saa7134-tvaudio.c:163:42: note: Calling 'tvaudio_carr2reg'
saa_writel(SAA7134_CARRIER1_FREQ0 >> 2, tvaudio_carr2reg(primary));
^
drivers/media/pci/saa7134/saa7134.h:691:44: note: expanded from macro 'saa_writel'
#define saa_writel(reg,value) writel((value), dev->lmmio + (reg));
^~~~~
arch/arm/include/asm/io.h:307:51: note: expanded from macro 'writel'
#define writel(v,c) ({ __iowmb(); writel_relaxed(v,c); })
^
arch/arm/include/asm/io.h:299:68: note: expanded from macro 'writel_relaxed'
#define writel_relaxed(v,c) __raw_writel((__force u32) cpu_to_le32(v),c)
^
include/uapi/linux/byteorder/little_endian.h:33:51: note: expanded from macro '__cpu_to_le32'
#define __cpu_to_le32(x) ((__force __le32)(__u32)(x))
^
drivers/media/pci/saa7134/saa7134-tvaudio.c:153:4: note: Assigned value is garbage or undefined
a <<= 24;
^ ~~
drivers/media/pci/saa7134/saa7134-tvaudio.c:494:3: warning: Value stored to 'max1' is never read [clang-analyzer-deadcode.DeadStores]
max1 = 0;
^ ~
drivers/media/pci/saa7134/saa7134-tvaudio.c:494:3: note: Value stored to 'max1' is never read
max1 = 0;
^ ~
Suppressed 7 warnings (7 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.
13 warnings generated.
drivers/media/i2c/ov2659.c:894:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = ov2659->client;
^~~~~~ ~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:894:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = ov2659->client;
^~~~~~ ~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:985:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:985:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:1001:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:1001:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:1027:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:1027:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = v4l2_get_subdevdata(sd);
^~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:1150:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = ov2659->client;
^~~~~~ ~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:1150:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = ov2659->client;
^~~~~~ ~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:1159:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = ov2659->client;
^~~~~~ ~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:1159:21: note: Value stored to 'client' during its initialization is never read
struct i2c_client *client = ov2659->client;
^~~~~~ ~~~~~~~~~~~~~~
drivers/media/i2c/ov2659.c:1303:21: warning: Value stored to 'client' during its initialization is never read [clang-analyzer-deadcode.DeadStores]
struct i2c_client *client = v4l2_get_subdevdata(sd);
vim +153 drivers/media/pci/saa7134/saa7134-tvaudio.c
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 148
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 149 static u32 tvaudio_carr2reg(u32 carrier)
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 150 {
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 151 u64 a = carrier;
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 152
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 @153 a <<= 24;
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 154 do_div(a,12288);
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 155 return a;
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 156 }
^1da177e4c3f41 drivers/media/video/saa7134/saa7134-tvaudio.c Linus Torvalds 2005-04-16 157
:::::: The code at line 153 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 2 weeks
drivers/pci/endpoint/pci-epc-mem.c:29:7: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Jakub Jelinek <jakub(a)redhat.com>
CC: "Peter Zijlstra (Intel)" <peterz(a)infradead.org>
CC: Andrew Morton <akpm(a)linux-foundation.org>
CC: Linux Memory Management List <linux-mm(a)kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d58071a8a76d779eedab38033ae4c821c30295a5
commit: 2f78788b55baa3410b1ec91a576286abe1ad4d6a ilog2: improve ilog2 for constant arguments
date: 12 months ago
:::::: branch date: 28 hours ago
:::::: commit date: 12 months ago
config: arm-randconfig-c002-20211126 (https://download.01.org/0day-ci/archive/20211130/202111301003.E8fLkNN5-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5162b558d8c0b542e752b037e72a69d5fd51eb1e)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 2f78788b55baa3410b1ec91a576286abe1ad4d6a
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~~~~~~~~~~~
kernel/time/clocksource.c:505:3: note: Taking true branch
if (fallback && cs == old_suspend)
^
kernel/time/clocksource.c:506:4: note: Execution continues on line 503
continue;
^
kernel/time/clocksource.c:503:2: note: Dereference of null pointer
list_for_each_entry(cs, &clocksource_list, list) {
^
include/linux/list.h:630:13: note: expanded from macro 'list_for_each_entry'
pos = list_next_entry(pos, member))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:555:2: note: expanded from macro 'list_next_entry'
list_entry((pos)->member.next, typeof(*(pos)), member)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/list.h:511:2: note: expanded from macro 'list_entry'
container_of(ptr, type, member)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/kernel.h:693:25: note: expanded from macro 'container_of'
void *__mptr = (void *)(ptr); \
^~~~~
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.
20 warnings generated.
crypto/sm3_generic.c:121:2: warning: Value stored to 'a' is never read [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:2: note: Value stored to 'a' is never read
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:6: warning: Although the value stored to 'b' is used in the enclosing expression, the value is never actually read from 'b' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:6: note: Although the value stored to 'b' is used in the enclosing expression, the value is never actually read from 'b'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:10: warning: Although the value stored to 'c' is used in the enclosing expression, the value is never actually read from 'c' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:10: note: Although the value stored to 'c' is used in the enclosing expression, the value is never actually read from 'c'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:14: warning: Although the value stored to 'd' is used in the enclosing expression, the value is never actually read from 'd' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:14: note: Although the value stored to 'd' is used in the enclosing expression, the value is never actually read from 'd'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:18: warning: Although the value stored to 'e' is used in the enclosing expression, the value is never actually read from 'e' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:18: note: Although the value stored to 'e' is used in the enclosing expression, the value is never actually read from 'e'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:22: warning: Although the value stored to 'f' is used in the enclosing expression, the value is never actually read from 'f' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:22: note: Although the value stored to 'f' is used in the enclosing expression, the value is never actually read from 'f'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:26: warning: Although the value stored to 'g' is used in the enclosing expression, the value is never actually read from 'g' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:26: note: Although the value stored to 'g' is used in the enclosing expression, the value is never actually read from 'g'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:30: warning: Although the value stored to 'h' is used in the enclosing expression, the value is never actually read from 'h' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:30: note: Although the value stored to 'h' is used in the enclosing expression, the value is never actually read from 'h'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:34: warning: Although the value stored to 'ss1' is used in the enclosing expression, the value is never actually read from 'ss1' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:34: note: Although the value stored to 'ss1' is used in the enclosing expression, the value is never actually read from 'ss1'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~~~~~~~
crypto/sm3_generic.c:121:40: warning: Although the value stored to 'ss2' is used in the enclosing expression, the value is never actually read from 'ss2' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~
crypto/sm3_generic.c:121:40: note: Although the value stored to 'ss2' is used in the enclosing expression, the value is never actually read from 'ss2'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~~~~~~~
crypto/sm3_generic.c:121:46: warning: Although the value stored to 'tt1' is used in the enclosing expression, the value is never actually read from 'tt1' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~
crypto/sm3_generic.c:121:46: note: Although the value stored to 'tt1' is used in the enclosing expression, the value is never actually read from 'tt1'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~~~~~~~
crypto/sm3_generic.c:121:52: warning: Although the value stored to 'tt2' is used in the enclosing expression, the value is never actually read from 'tt2' [clang-analyzer-deadcode.DeadStores]
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~
crypto/sm3_generic.c:121:52: note: Although the value stored to 'tt2' is used in the enclosing expression, the value is never actually read from 'tt2'
a = b = c = d = e = f = g = h = ss1 = ss2 = tt1 = tt2 = 0;
^ ~
Suppressed 8 warnings (8 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.
8 warnings generated.
>> drivers/pci/endpoint/pci-epc-mem.c:29:7: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
size >>= page_shift;
^
drivers/pci/endpoint/pci-epc-mem.c:244:7: note: 'mem' is non-null
if (!mem) {
^~~
drivers/pci/endpoint/pci-epc-mem.c:244:2: note: Taking false branch
if (!mem) {
^
drivers/pci/endpoint/pci-epc-mem.c:250:15: note: '?' condition is false
page_shift = ilog2(page_size);
^
include/linux/log2.h:158:2: note: expanded from macro 'ilog2'
__builtin_constant_p(n) ? \
^
drivers/pci/endpoint/pci-epc-mem.c:250:15: note: '?' condition is true
page_shift = ilog2(page_size);
^
include/linux/log2.h:161:2: note: expanded from macro 'ilog2'
(sizeof(n) <= 4) ? \
^
drivers/pci/endpoint/pci-epc-mem.c:254:10: note: Calling 'pci_epc_mem_get_order'
order = pci_epc_mem_get_order(mem, size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/endpoint/pci-epc-mem.c:26:28: note: '?' condition is false
unsigned int page_shift = ilog2(mem->window.page_size);
^
include/linux/log2.h:158:2: note: expanded from macro 'ilog2'
__builtin_constant_p(n) ? \
^
drivers/pci/endpoint/pci-epc-mem.c:26:28: note: '?' condition is true
unsigned int page_shift = ilog2(mem->window.page_size);
^
include/linux/log2.h:161:2: note: expanded from macro 'ilog2'
(sizeof(n) <= 4) ? \
^
drivers/pci/endpoint/pci-epc-mem.c:26:28: note: Calling '__ilog2_u32'
unsigned int page_shift = ilog2(mem->window.page_size);
^
include/linux/log2.h:162:2: note: expanded from macro 'ilog2'
__ilog2_u32(n) : \
^~~~~~~~~~~~~~
include/linux/log2.h:24:2: note: Returning the value -1
return fls(n) - 1;
^~~~~~~~~~~~~~~~~
drivers/pci/endpoint/pci-epc-mem.c:26:28: note: Returning from '__ilog2_u32'
unsigned int page_shift = ilog2(mem->window.page_size);
^
include/linux/log2.h:162:2: note: expanded from macro 'ilog2'
__ilog2_u32(n) : \
^~~~~~~~~~~~~~
drivers/pci/endpoint/pci-epc-mem.c:26:2: note: 'page_shift' initialized to 4294967295
unsigned int page_shift = ilog2(mem->window.page_size);
^~~~~~~~~~~~~~~~~~~~~~~
drivers/pci/endpoint/pci-epc-mem.c:29:7: note: Assigned value is garbage or undefined
size >>= page_shift;
^ ~~~~~~~~~~
Suppressed 7 warnings (7 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.
8 warnings generated.
drivers/pci/endpoint/functions/pci-epf-test.c:758:17: warning: Access to field 'msix_capable' results in a dereference of a null pointer (loaded from variable 'epc_features') [clang-analyzer-core.NullDereference]
msix_capable = epc_features->msix_capable;
^
drivers/pci/endpoint/functions/pci-epf-test.c:829:19: note: Assuming 'epc' is non-null
if (WARN_ON_ONCE(!epc))
^
include/asm-generic/bug.h:145:27: note: expanded from macro 'WARN_ON_ONCE'
int __ret_warn_once = !!(condition); \
^~~~~~~~~
drivers/pci/endpoint/functions/pci-epf-test.c:829:6: note: '__ret_warn_once' is 0
if (WARN_ON_ONCE(!epc))
^
include/asm-generic/bug.h:147:15: note: expanded from macro 'WARN_ON_ONCE'
if (unlikely(__ret_warn_once && !__warned)) { \
^~~~~~~~~~~~~~~
include/linux/compiler.h:48:41: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/linux/compiler.h:33:34: note: expanded from macro '__branch_check__'
______r = __builtin_expect(!!(x), expect); \
^
drivers/pci/endpoint/functions/pci-epf-test.c:829:6: note: Left side of '&&' is false
if (WARN_ON_ONCE(!epc))
^
include/asm-generic/bug.h:147:31: note: expanded from macro 'WARN_ON_ONCE'
if (unlikely(__ret_warn_once && !__warned)) { \
^
drivers/pci/endpoint/functions/pci-epf-test.c:829:6: note: '__ret_warn_once' is 0
if (WARN_ON_ONCE(!epc))
^
include/asm-generic/bug.h:147:15: note: expanded from macro 'WARN_ON_ONCE'
if (unlikely(__ret_warn_once && !__warned)) { \
^~~~~~~~~~~~~~~
include/linux/compiler.h:48:68: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/linux/compiler.h:35:19: note: expanded from macro '__branch_check__'
expect, is_constant); \
^~~~~~~~~~~
drivers/pci/endpoint/functions/pci-epf-test.c:829:6: note: Left side of '&&' is false
if (WARN_ON_ONCE(!epc))
--
^~~~
drivers/net/ethernet/brocade/bna/bnad.c:1243:3: note: Taking false branch
if (!ccb)
^
drivers/net/ethernet/brocade/bna/bnad.c:1248:3: note: Loop condition is true. Entering loop body
for (j = 0; j < BNAD_MAX_RXQ_PER_RXP; j++) {
^
drivers/net/ethernet/brocade/bna/bnad.c:1250:8: note: Assuming 'rcb' is non-null
if (!rcb)
^~~~
drivers/net/ethernet/brocade/bna/bnad.c:1250:4: note: Taking false branch
if (!rcb)
^
drivers/net/ethernet/brocade/bna/bnad.c:1253:4: note: Calling 'bnad_rxq_alloc_init'
bnad_rxq_alloc_init(bnad, rcb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:266:10: note: Calling 'get_order'
order = get_order(rcb->rxq->buffer_size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/asm-generic/getorder.h:31:2: note: Taking false branch
if (__builtin_constant_p(size)) {
^
include/asm-generic/getorder.h:44:9: note: Calling 'fls'
return fls(size);
^~~~~~~~~
include/asm-generic/bitops/fls.h:15:2: note: 'r' initialized to 32
int r = 32;
^~~~~
include/asm-generic/bitops/fls.h:17:6: note: Assuming 'x' is not equal to 0, which participates in a condition later
if (!x)
^~
include/asm-generic/bitops/fls.h:17:2: note: Taking false branch
if (!x)
^
include/asm-generic/bitops/fls.h:19:6: note: Assuming the condition is false
if (!(x & 0xffff0000u)) {
^~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/fls.h:19:2: note: Taking false branch
if (!(x & 0xffff0000u)) {
^
include/asm-generic/bitops/fls.h:23:6: note: Assuming the condition is false
if (!(x & 0xff000000u)) {
^~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/fls.h:23:2: note: Taking false branch
if (!(x & 0xff000000u)) {
^
include/asm-generic/bitops/fls.h:27:6: note: Assuming the condition is false
if (!(x & 0xf0000000u)) {
^~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/fls.h:27:2: note: Taking false branch
if (!(x & 0xf0000000u)) {
^
include/asm-generic/bitops/fls.h:31:6: note: Assuming the condition is false
if (!(x & 0xc0000000u)) {
^~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/fls.h:31:2: note: Taking false branch
if (!(x & 0xc0000000u)) {
^
include/asm-generic/bitops/fls.h:35:6: note: Assuming the condition is false
if (!(x & 0x80000000u)) {
^~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/fls.h:35:2: note: Taking false branch
if (!(x & 0x80000000u)) {
^
include/asm-generic/bitops/fls.h:39:2: note: Returning the value 32 (loaded from 'r')
return r;
^~~~~~~~
include/asm-generic/getorder.h:44:9: note: Returning from 'fls'
return fls(size);
^~~~~~~~~
include/asm-generic/getorder.h:44:2: note: Returning the value 32
return fls(size);
^~~~~~~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:266:10: note: Returning from 'get_order'
order = get_order(rcb->rxq->buffer_size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:266:2: note: The value 32 is assigned to 'order'
order = get_order(rcb->rxq->buffer_size);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:270:6: note: Assuming the condition is true
if (bna_is_small_rxq(rcb->id)) {
^
drivers/net/ethernet/brocade/bna/bna.h:23:32: note: expanded from macro 'bna_is_small_rxq'
#define bna_is_small_rxq(_id) ((_id) & 0x1)
^~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:270:2: note: Taking true branch
if (bna_is_small_rxq(rcb->id)) {
^
drivers/net/ethernet/brocade/bna/bnad.c:286:20: note: The result of the left shift is undefined due to shifting by '32', which is greater or equal to the width of type 'unsigned long'
BUG_ON((PAGE_SIZE << order) % unmap_q->map_size);
^
include/asm-generic/bug.h:63:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
^~~~~~~~~
include/linux/compiler.h:48:41: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/linux/compiler.h:33:34: note: expanded from macro '__branch_check__'
______r = __builtin_expect(!!(x), expect); \
^
>> drivers/net/ethernet/brocade/bna/bnad.c:286:30: warning: Division by zero [clang-analyzer-core.DivideZero]
BUG_ON((PAGE_SIZE << order) % unmap_q->map_size);
^
drivers/net/ethernet/brocade/bna/bnad.c:1240:2: note: Loop condition is true. Entering loop body
for (i = 0; i < BNAD_MAX_RXP_PER_RX; i++) {
^
drivers/net/ethernet/brocade/bna/bnad.c:1243:7: note: Assuming 'ccb' is non-null
if (!ccb)
^~~~
drivers/net/ethernet/brocade/bna/bnad.c:1243:3: note: Taking false branch
if (!ccb)
^
drivers/net/ethernet/brocade/bna/bnad.c:1248:3: note: Loop condition is true. Entering loop body
for (j = 0; j < BNAD_MAX_RXQ_PER_RXP; j++) {
^
drivers/net/ethernet/brocade/bna/bnad.c:1250:8: note: Assuming 'rcb' is non-null
if (!rcb)
^~~~
drivers/net/ethernet/brocade/bna/bnad.c:1250:4: note: Taking false branch
if (!rcb)
^
drivers/net/ethernet/brocade/bna/bnad.c:1253:4: note: Calling 'bnad_rxq_alloc_init'
bnad_rxq_alloc_init(bnad, rcb);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:270:6: note: Assuming the condition is false
if (bna_is_small_rxq(rcb->id)) {
^
drivers/net/ethernet/brocade/bna/bna.h:23:32: note: expanded from macro 'bna_is_small_rxq'
#define bna_is_small_rxq(_id) ((_id) & 0x1)
^~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:270:2: note: Taking false branch
if (bna_is_small_rxq(rcb->id)) {
^
drivers/net/ethernet/brocade/bna/bnad.c:274:7: note: Assuming field 'multi_buffer' is 0
if (rcb->rxq->multi_buffer) {
^~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:274:3: note: Taking false branch
if (rcb->rxq->multi_buffer) {
^
drivers/net/ethernet/brocade/bna/bnad.c:281:6: note: Assuming field 'buffer_size' is > 2048
(rcb->rxq->buffer_size > 2048) ?
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:281:5: note: '?' condition is true
(rcb->rxq->buffer_size > 2048) ?
^
drivers/net/ethernet/brocade/bna/bnad.c:280:4: note: The value 0 is assigned to field 'map_size'
unmap_q->map_size =
^~~~~~~~~~~~~~~~~~~
drivers/net/ethernet/brocade/bna/bnad.c:286:30: note: Division by zero
BUG_ON((PAGE_SIZE << order) % unmap_q->map_size);
^
include/asm-generic/bug.h:63:45: note: expanded from macro 'BUG_ON'
#define BUG_ON(condition) do { if (unlikely(condition)) BUG(); } while (0)
~~~~~~~~~^~~~~~~~~~
include/linux/compiler.h:48:41: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:33:34: note: expanded from macro '__branch_check__'
______r = __builtin_expect(!!(x), expect); \
^
drivers/net/ethernet/brocade/bna/bnad.c:396:3: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
BNA_SET_DMA_ADDR(dma_addr, &rxent->host_addr);
^
drivers/net/ethernet/brocade/bna/bna.h:34:23: note: expanded from macro 'BNA_SET_DMA_ADDR'
(_bna_dma_addr)->lsb = ((struct bna_dma_addr *)&tmp_addr)->lsb; \
^
drivers/net/ethernet/brocade/bna/bnad.c:1860:3: note: Left side of '&&' is false
container_of(napi, struct bnad_rx_ctrl, napi);
^
include/linux/kernel.h:694:61: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
drivers/net/ethernet/brocade/bna/bnad.c:1860:3: note: Taking false branch
container_of(napi, struct bnad_rx_ctrl, napi);
^
include/linux/kernel.h:694:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
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)) \
^
drivers/net/ethernet/brocade/bna/bnad.c:1860:3: note: Loop condition is false. Exiting loop
container_of(napi, struct bnad_rx_ctrl, napi);
^
include/linux/kernel.h:694:2: note: expanded from macro 'container_of'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^
include/linux/build_bug.h:39:37: note: expanded from macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^
include/linux/compiler_types.h:315:2: note: expanded from macro 'compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
vim +29 drivers/pci/endpoint/pci-epc-mem.c
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 14
5e8cb4033807e3 Kishon Vijay Abraham I 2017-04-10 15 /**
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 16 * pci_epc_mem_get_order() - determine the allocation order of a memory size
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 17 * @mem: address space of the endpoint controller
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 18 * @size: the size for which to get the order
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 19 *
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 20 * Reimplement get_order() for mem->page_size since the generic get_order
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 21 * always gets order with a constant PAGE_SIZE.
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 22 */
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 23 static int pci_epc_mem_get_order(struct pci_epc_mem *mem, size_t size)
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 24 {
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 25 int order;
d45e3c1a5979ef Lad Prabhakar 2020-05-07 26 unsigned int page_shift = ilog2(mem->window.page_size);
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 27
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 28 size--;
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 @29 size >>= page_shift;
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 30 #if BITS_PER_LONG == 32
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 31 order = fls(size);
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 32 #else
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 33 order = fls64(size);
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 34 #endif
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 35 return order;
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 36 }
52c9285d47459c Kishon Vijay Abraham I 2017-08-18 37
:::::: The code at line 29 was first introduced by commit
:::::: 52c9285d47459cf241e144c7d8ef15941ba1b181 PCI: endpoint: Add support for configurable page size
:::::: TO: Kishon Vijay Abraham I <kishon(a)ti.com>
:::::: CC: Bjorn Helgaas <bhelgaas(a)google.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 2 weeks
Re: [RFC PATCH net] net: ipv6: make fib6_nh_init properly clean after itself on error
by kernel test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20211129141151.490533-1-razor(a)blackwall.org>
References: <20211129141151.490533-1-razor(a)blackwall.org>
TO: Nikolay Aleksandrov <razor(a)blackwall.org>
Hi Nikolay,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net/master]
url: https://github.com/0day-ci/linux/commits/Nikolay-Aleksandrov/net-ipv6-mak...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git 2191b1dfef7d45f44b5008d2148676d9f2c82874
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
config: x86_64-randconfig-s032-20211128 (https://download.01.org/0day-ci/archive/20211130/202111300910.7HWZTGBF-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
# https://github.com/0day-ci/linux/commit/2db1685345b4a1aecadba0a8197c79f5e...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Nikolay-Aleksandrov/net-ipv6-make-fib6_nh_init-properly-clean-after-itself-on-error/20211130-001132
git checkout 2db1685345b4a1aecadba0a8197c79f5e49da8ec
# save the config file to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> net/ipv4/nexthop.c:2570:1: sparse: sparse: unused label 'out'
net/ipv4/nexthop.c: note: in included file (through include/linux/sysctl.h, include/net/net_namespace.h, include/linux/netdevice.h, ...):
include/linux/rbtree.h:74:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
include/linux/rbtree.h:74:9: sparse: struct rb_node [noderef] __rcu *
include/linux/rbtree.h:74:9: sparse: struct rb_node *
vim +/out +2570 net/ipv4/nexthop.c
597cfe4fc3390a David Ahern 2019-05-24 2544
53010f991a9f5e David Ahern 2019-05-24 2545 static int nh_create_ipv6(struct net *net, struct nexthop *nh,
53010f991a9f5e David Ahern 2019-05-24 2546 struct nh_info *nhi, struct nh_config *cfg,
53010f991a9f5e David Ahern 2019-05-24 2547 struct netlink_ext_ack *extack)
53010f991a9f5e David Ahern 2019-05-24 2548 {
53010f991a9f5e David Ahern 2019-05-24 2549 struct fib6_nh *fib6_nh = &nhi->fib6_nh;
53010f991a9f5e David Ahern 2019-05-24 2550 struct fib6_config fib6_cfg = {
53010f991a9f5e David Ahern 2019-05-24 2551 .fc_table = l3mdev_fib_table(cfg->dev),
53010f991a9f5e David Ahern 2019-05-24 2552 .fc_ifindex = cfg->nh_ifindex,
53010f991a9f5e David Ahern 2019-05-24 2553 .fc_gateway = cfg->gw.ipv6,
53010f991a9f5e David Ahern 2019-05-24 2554 .fc_flags = cfg->nh_flags,
9aca491e0dccf8 Ryoga Saito 2021-09-02 2555 .fc_nlinfo = cfg->nlinfo,
b513bd035f4044 David Ahern 2019-05-24 2556 .fc_encap = cfg->nh_encap,
b513bd035f4044 David Ahern 2019-05-24 2557 .fc_encap_type = cfg->nh_encap_type,
38428d68719c45 Roopa Prabhu 2020-05-21 2558 .fc_is_fdb = cfg->nh_fdb,
53010f991a9f5e David Ahern 2019-05-24 2559 };
6f43e5252833f3 Colin Ian King 2019-05-30 2560 int err;
53010f991a9f5e David Ahern 2019-05-24 2561
53010f991a9f5e David Ahern 2019-05-24 2562 if (!ipv6_addr_any(&cfg->gw.ipv6))
53010f991a9f5e David Ahern 2019-05-24 2563 fib6_cfg.fc_flags |= RTF_GATEWAY;
53010f991a9f5e David Ahern 2019-05-24 2564
53010f991a9f5e David Ahern 2019-05-24 2565 /* sets nh_dev if successful */
53010f991a9f5e David Ahern 2019-05-24 2566 err = ipv6_stub->fib6_nh_init(net, fib6_nh, &fib6_cfg, GFP_KERNEL,
53010f991a9f5e David Ahern 2019-05-24 2567 extack);
2db1685345b4a1 Nikolay Aleksandrov 2021-11-29 2568 if (!err)
53010f991a9f5e David Ahern 2019-05-24 2569 nh->nh_flags = fib6_nh->fib_nh_flags;
1c743127cc54b1 Nikolay Aleksandrov 2021-11-23 @2570 out:
53010f991a9f5e David Ahern 2019-05-24 2571 return err;
53010f991a9f5e David Ahern 2019-05-24 2572 }
53010f991a9f5e David Ahern 2019-05-24 2573
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 2 weeks
[linux-next:master 4037/4411] net/unix/af_unix.c:1531 unix_stream_connect() warn: variable dereferenced before check 'other' (see line 1414)
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: Linux Memory Management List <linux-mm(a)kvack.org>
TO: Kuniyuki Iwashima <kuniyu(a)amazon.co.jp>
CC: Jakub Kicinski <kuba(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 92f4080436219b1bc4de617f8b274895609989c8
commit: aed26f557bbc94f0c778f63d7dfe86af99208f68 [4037/4411] af_unix: Return an error as a pointer in unix_find_other().
:::::: branch date: 16 hours ago
:::::: commit date: 3 days ago
config: i386-randconfig-m021-20211128 (https://download.01.org/0day-ci/archive/20211130/202111300709.KaYuGOxA-lk...)
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(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
net/unix/af_unix.c:1531 unix_stream_connect() warn: variable dereferenced before check 'other' (see line 1414)
vim +/other +1531 net/unix/af_unix.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 1345
^1da177e4c3f41 Linus Torvalds 2005-04-16 1346 static int unix_stream_connect(struct socket *sock, struct sockaddr *uaddr,
^1da177e4c3f41 Linus Torvalds 2005-04-16 1347 int addr_len, int flags)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1348 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1349 struct sockaddr_un *sunaddr = (struct sockaddr_un *)uaddr;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1350 struct sock *sk = sock->sk;
3b1e0a655f8eba YOSHIFUJI Hideaki 2008-03-26 1351 struct net *net = sock_net(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1352 struct unix_sock *u = unix_sk(sk), *newu, *otheru;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1353 struct sock *newsk = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1354 struct sock *other = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1355 struct sk_buff *skb = NULL;
95c961747284a6 Eric Dumazet 2012-04-15 1356 unsigned int hash;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1357 int st;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1358 int err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1359 long timeo;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1360
^1da177e4c3f41 Linus Torvalds 2005-04-16 1361 err = unix_mkname(sunaddr, addr_len, &hash);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1362 if (err < 0)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1363 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1364 addr_len = err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1365
f7ed31f4615f4e Kuniyuki Iwashima 2021-11-24 1366 if (test_bit(SOCK_PASSCRED, &sock->flags) && !u->addr) {
f7ed31f4615f4e Kuniyuki Iwashima 2021-11-24 1367 err = unix_autobind(sk);
f7ed31f4615f4e Kuniyuki Iwashima 2021-11-24 1368 if (err)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1369 goto out;
f7ed31f4615f4e Kuniyuki Iwashima 2021-11-24 1370 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1371
^1da177e4c3f41 Linus Torvalds 2005-04-16 1372 timeo = sock_sndtimeo(sk, flags & O_NONBLOCK);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1373
^1da177e4c3f41 Linus Torvalds 2005-04-16 1374 /* First of all allocate resources.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1375 If we will make it after state is locked,
^1da177e4c3f41 Linus Torvalds 2005-04-16 1376 we will have to recheck all again in any case.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1377 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1378
^1da177e4c3f41 Linus Torvalds 2005-04-16 1379 /* create new sock for complete connection */
94531cfcbe79c3 Jiang Wang 2021-08-16 1380 newsk = unix_create1(sock_net(sk), NULL, 0, sock->type);
f4bd73b5a95086 Kuniyuki Iwashima 2021-09-28 1381 if (IS_ERR(newsk)) {
f4bd73b5a95086 Kuniyuki Iwashima 2021-09-28 1382 err = PTR_ERR(newsk);
f4bd73b5a95086 Kuniyuki Iwashima 2021-09-28 1383 newsk = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1384 goto out;
f4bd73b5a95086 Kuniyuki Iwashima 2021-09-28 1385 }
f4bd73b5a95086 Kuniyuki Iwashima 2021-09-28 1386
f4bd73b5a95086 Kuniyuki Iwashima 2021-09-28 1387 err = -ENOMEM;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1388
^1da177e4c3f41 Linus Torvalds 2005-04-16 1389 /* Allocate skb for sending to listening sock */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1390 skb = sock_wmalloc(newsk, 1, 0, GFP_KERNEL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1391 if (skb == NULL)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1392 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1393
^1da177e4c3f41 Linus Torvalds 2005-04-16 1394 restart:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1395 /* Find listening sock. */
aed26f557bbc94 Kuniyuki Iwashima 2021-11-24 1396 other = unix_find_other(net, sunaddr, addr_len, sk->sk_type, hash);
aed26f557bbc94 Kuniyuki Iwashima 2021-11-24 1397 if (IS_ERR(other)) {
aed26f557bbc94 Kuniyuki Iwashima 2021-11-24 1398 err = PTR_ERR(other);
aed26f557bbc94 Kuniyuki Iwashima 2021-11-24 1399 other = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1400 goto out;
aed26f557bbc94 Kuniyuki Iwashima 2021-11-24 1401 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1402
^1da177e4c3f41 Linus Torvalds 2005-04-16 1403 /* Latch state of peer */
1c92b4e50ef926 David S. Miller 2007-05-31 1404 unix_state_lock(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1405
^1da177e4c3f41 Linus Torvalds 2005-04-16 1406 /* Apparently VFS overslept socket death. Retry. */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1407 if (sock_flag(other, SOCK_DEAD)) {
1c92b4e50ef926 David S. Miller 2007-05-31 1408 unix_state_unlock(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1409 sock_put(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1410 goto restart;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1411 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1412
^1da177e4c3f41 Linus Torvalds 2005-04-16 1413 err = -ECONNREFUSED;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @1414 if (other->sk_state != TCP_LISTEN)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1415 goto out_unlock;
77238f2b942b38 Tomoki Sekiyama 2009-10-18 1416 if (other->sk_shutdown & RCV_SHUTDOWN)
77238f2b942b38 Tomoki Sekiyama 2009-10-18 1417 goto out_unlock;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1418
3c73419c09a5ef Rainer Weikusat 2008-06-17 1419 if (unix_recvq_full(other)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1420 err = -EAGAIN;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1421 if (!timeo)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1422 goto out_unlock;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1423
^1da177e4c3f41 Linus Torvalds 2005-04-16 1424 timeo = unix_wait_for_peer(other, timeo);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1425
^1da177e4c3f41 Linus Torvalds 2005-04-16 1426 err = sock_intr_errno(timeo);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1427 if (signal_pending(current))
^1da177e4c3f41 Linus Torvalds 2005-04-16 1428 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1429 sock_put(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1430 goto restart;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1431 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1432
^1da177e4c3f41 Linus Torvalds 2005-04-16 1433 /* Latch our state.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1434
e5537bfc98f015 Daniel Baluta 2011-03-14 1435 It is tricky place. We need to grab our state lock and cannot
^1da177e4c3f41 Linus Torvalds 2005-04-16 1436 drop lock on peer. It is dangerous because deadlock is
^1da177e4c3f41 Linus Torvalds 2005-04-16 1437 possible. Connect to self case and simultaneous
^1da177e4c3f41 Linus Torvalds 2005-04-16 1438 attempt to connect are eliminated by checking socket
^1da177e4c3f41 Linus Torvalds 2005-04-16 1439 state. other is TCP_LISTEN, if sk is TCP_LISTEN we
^1da177e4c3f41 Linus Torvalds 2005-04-16 1440 check this before attempt to grab lock.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1441
^1da177e4c3f41 Linus Torvalds 2005-04-16 1442 Well, and we have to recheck the state after socket locked.
^1da177e4c3f41 Linus Torvalds 2005-04-16 1443 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1444 st = sk->sk_state;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1445
^1da177e4c3f41 Linus Torvalds 2005-04-16 1446 switch (st) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 1447 case TCP_CLOSE:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1448 /* This is ok... continue with connect */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1449 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1450 case TCP_ESTABLISHED:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1451 /* Socket is already connected */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1452 err = -EISCONN;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1453 goto out_unlock;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1454 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1455 err = -EINVAL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1456 goto out_unlock;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1457 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1458
1c92b4e50ef926 David S. Miller 2007-05-31 1459 unix_state_lock_nested(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1460
^1da177e4c3f41 Linus Torvalds 2005-04-16 1461 if (sk->sk_state != st) {
1c92b4e50ef926 David S. Miller 2007-05-31 1462 unix_state_unlock(sk);
1c92b4e50ef926 David S. Miller 2007-05-31 1463 unix_state_unlock(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1464 sock_put(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1465 goto restart;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1466 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1467
3610cda53f247e David S. Miller 2011-01-05 1468 err = security_unix_stream_connect(sk, other, newsk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1469 if (err) {
1c92b4e50ef926 David S. Miller 2007-05-31 1470 unix_state_unlock(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1471 goto out_unlock;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1472 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1473
^1da177e4c3f41 Linus Torvalds 2005-04-16 1474 /* The way is open! Fastly set all the necessary fields... */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1475
^1da177e4c3f41 Linus Torvalds 2005-04-16 1476 sock_hold(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1477 unix_peer(newsk) = sk;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1478 newsk->sk_state = TCP_ESTABLISHED;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1479 newsk->sk_type = sk->sk_type;
109f6e39fa07c4 Eric W. Biederman 2010-06-13 1480 init_peercred(newsk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1481 newu = unix_sk(newsk);
eaefd1105bc431 Eric Dumazet 2011-02-18 1482 RCU_INIT_POINTER(newsk->sk_wq, &newu->peer_wq);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1483 otheru = unix_sk(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1484
ae3b564179bfd0 Al Viro 2019-02-15 1485 /* copy address information from listening to new sock
ae3b564179bfd0 Al Viro 2019-02-15 1486 *
ae3b564179bfd0 Al Viro 2019-02-15 1487 * The contents of *(otheru->addr) and otheru->path
ae3b564179bfd0 Al Viro 2019-02-15 1488 * are seen fully set up here, since we have found
ae3b564179bfd0 Al Viro 2019-02-15 1489 * otheru in hash under unix_table_lock. Insertion
ae3b564179bfd0 Al Viro 2019-02-15 1490 * into the hash chain we'd found it in had been done
ae3b564179bfd0 Al Viro 2019-02-15 1491 * in an earlier critical area protected by unix_table_lock,
ae3b564179bfd0 Al Viro 2019-02-15 1492 * the same one where we'd set *(otheru->addr) contents,
ae3b564179bfd0 Al Viro 2019-02-15 1493 * as well as otheru->path and otheru->addr itself.
ae3b564179bfd0 Al Viro 2019-02-15 1494 *
ae3b564179bfd0 Al Viro 2019-02-15 1495 * Using smp_store_release() here to set newu->addr
ae3b564179bfd0 Al Viro 2019-02-15 1496 * is enough to make those stores, as well as stores
ae3b564179bfd0 Al Viro 2019-02-15 1497 * to newu->path visible to anyone who gets newu->addr
ae3b564179bfd0 Al Viro 2019-02-15 1498 * by smp_load_acquire(). IOW, the same warranties
ae3b564179bfd0 Al Viro 2019-02-15 1499 * as for unix_sock instances bound in unix_bind() or
ae3b564179bfd0 Al Viro 2019-02-15 1500 * in unix_autobind().
ae3b564179bfd0 Al Viro 2019-02-15 1501 */
40ffe67d2e89c7 Al Viro 2012-03-14 1502 if (otheru->path.dentry) {
40ffe67d2e89c7 Al Viro 2012-03-14 1503 path_get(&otheru->path);
40ffe67d2e89c7 Al Viro 2012-03-14 1504 newu->path = otheru->path;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1505 }
ae3b564179bfd0 Al Viro 2019-02-15 1506 refcount_inc(&otheru->addr->refcnt);
ae3b564179bfd0 Al Viro 2019-02-15 1507 smp_store_release(&newu->addr, otheru->addr);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1508
^1da177e4c3f41 Linus Torvalds 2005-04-16 1509 /* Set credentials */
109f6e39fa07c4 Eric W. Biederman 2010-06-13 1510 copy_peercred(sk, other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1511
^1da177e4c3f41 Linus Torvalds 2005-04-16 1512 sock->state = SS_CONNECTED;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1513 sk->sk_state = TCP_ESTABLISHED;
830a1e5c212fb3 Benjamin LaHaise 2005-12-13 1514 sock_hold(newsk);
830a1e5c212fb3 Benjamin LaHaise 2005-12-13 1515
4e857c58efeb99 Peter Zijlstra 2014-03-17 1516 smp_mb__after_atomic(); /* sock_hold() does an atomic_inc() */
830a1e5c212fb3 Benjamin LaHaise 2005-12-13 1517 unix_peer(sk) = newsk;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1518
1c92b4e50ef926 David S. Miller 2007-05-31 1519 unix_state_unlock(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1520
4e03d073afc4f6 gushengxian 2021-06-09 1521 /* take ten and send info to listening sock */
^1da177e4c3f41 Linus Torvalds 2005-04-16 1522 spin_lock(&other->sk_receive_queue.lock);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1523 __skb_queue_tail(&other->sk_receive_queue, skb);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1524 spin_unlock(&other->sk_receive_queue.lock);
1c92b4e50ef926 David S. Miller 2007-05-31 1525 unix_state_unlock(other);
676d23690fb62b David S. Miller 2014-04-11 1526 other->sk_data_ready(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1527 sock_put(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1528 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1529
^1da177e4c3f41 Linus Torvalds 2005-04-16 1530 out_unlock:
^1da177e4c3f41 Linus Torvalds 2005-04-16 @1531 if (other)
1c92b4e50ef926 David S. Miller 2007-05-31 1532 unix_state_unlock(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1533
^1da177e4c3f41 Linus Torvalds 2005-04-16 1534 out:
^1da177e4c3f41 Linus Torvalds 2005-04-16 1535 kfree_skb(skb);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1536 if (newsk)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1537 unix_release_sock(newsk, 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1538 if (other)
^1da177e4c3f41 Linus Torvalds 2005-04-16 1539 sock_put(other);
^1da177e4c3f41 Linus Torvalds 2005-04-16 1540 return err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 1541 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 1542
:::::: The code at line 1531 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 2 weeks
[PATCH] RDMA/mlx5: fix call_kern.cocci warnings
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Aharon Landau <aharonl(a)nvidia.com>
CC: Leon Romanovsky <leonro(a)nvidia.com>
CC: Doug Ledford <dledford(a)redhat.com>
CC: Jason Gunthorpe <jgg(a)ziepe.ca>
CC: linux-rdma(a)vger.kernel.org
CC: linux-kernel(a)vger.kernel.org
From: kernel test robot <lkp(a)intel.com>
drivers/infiniband/hw/mlx5/mr.c:284:60-70: ERROR: function remove_cache_mr_locked called on line 536 inside lock on line 531 but uses GFP_KERNEL
drivers/infiniband/hw/mlx5/mr.c:284:60-70: ERROR: function remove_cache_mr_locked called on line 319 inside lock on line 312 but uses GFP_KERNEL
Find functions that refer to GFP_KERNEL but are called with locks held.
Semantic patch information:
The proposed change of converting the GFP_KERNEL is not necessarily the
correct one. It may be desired to unlock the lock, or to not call the
function under the lock in the first place.
Generated by: scripts/coccinelle/locks/call_kern.cocci
Fixes: bf3dc01c2c55 ("RDMA/mlx5: Replace the MR cache with an Mkey cache")
CC: Aharon Landau <aharonl(a)nvidia.com>
Reported-by: kernel test robot <lkp(a)intel.com>
Signed-off-by: kernel test robot <lkp(a)intel.com>
---
tree: https://git.kernel.org/pub/scm/linux/kernel/git/leon/linux-rdma.git rdma-next
head: 10e4a930e72e9e35f67b47c025dcac31d3a09b38
commit: bf3dc01c2c551326778642f6f663637b8cde461c [3/30] RDMA/mlx5: Replace the MR cache with an Mkey cache
:::::: branch date: 13 hours ago
:::::: commit date: 2 days ago
Please take the patch only if it's a positive warning. Thanks!
mr.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/infiniband/hw/mlx5/mr.c
+++ b/drivers/infiniband/hw/mlx5/mr.c
@@ -281,7 +281,7 @@ static void remove_cache_mr_locked(struc
lockdep_assert_held(&ent->lock);
if (!ent->available_mrs)
return;
- xa_ent = xa_store(&ent->mkeys, --ent->available_mrs, NULL, GFP_KERNEL);
+ xa_ent = xa_store(&ent->mkeys, --ent->available_mrs, NULL, GFP_ATOMIC);
WARN_ON(xa_ent == NULL || xa_is_err(xa_ent));
xa_erase(&ent->mkeys, ent->available_mrs + ent->pending);
ent->total_mrs--;
8 months, 2 weeks
net/compat.c:444:5: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Kees Cook <keescook(a)chromium.org>
CC: Miguel Ojeda <ojeda(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d58071a8a76d779eedab38033ae4c821c30295a5
commit: c80d92fbb67b2c80b8eeb8759ee79d676eb33520 compiler_types.h: Remove __compiletime_object_size()
date: 9 weeks ago
:::::: branch date: 22 hours ago
:::::: commit date: 9 weeks ago
config: x86_64-randconfig-c007-20211118 (https://download.01.org/0day-ci/archive/20211130/202111300429.yXuxMpIr-lk...)
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...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout c80d92fbb67b2c80b8eeb8759ee79d676eb33520
# 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(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/gfs2/dir.c:815:6: note: Assuming the condition is false
if (ip->i_diskflags & GFS2_DIF_EXHASH) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/gfs2/dir.c:815:2: note: Taking false branch
if (ip->i_diskflags & GFS2_DIF_EXHASH) {
^
fs/gfs2/dir.c:848:6: note: Assuming 'error' is not equal to 0
if (error)
^~~~~
fs/gfs2/dir.c:848:2: note: Taking true branch
if (error)
^
fs/gfs2/dir.c:849:3: note: Returning without writing to '*pbh'
return ERR_PTR(error);
^
fs/gfs2/dir.c:2169:9: note: Returning from 'gfs2_dirent_search'
dent = gfs2_dirent_search(inode, name, gfs2_dirent_find_space, &bh);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/gfs2/dir.c:2170:6: note: Assuming 'dent' is non-null
if (!dent) {
^~~~~
fs/gfs2/dir.c:2170:2: note: Taking false branch
if (!dent) {
^
fs/gfs2/dir.c:2177:6: note: Calling 'IS_ERR'
if (IS_ERR(dent))
^~~~~~~~~~~~
include/linux/err.h:36:9: note: Assuming the condition is false
return IS_ERR_VALUE((unsigned long)ptr);
^
include/linux/err.h:22:34: note: expanded from macro 'IS_ERR_VALUE'
#define IS_ERR_VALUE(x) unlikely((unsigned long)(void *)(x) >= (unsigned long)-MAX_ERRNO)
~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/err.h:36:2: note: Returning zero, which participates in a condition later
return IS_ERR_VALUE((unsigned long)ptr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/gfs2/dir.c:2177:6: note: Returning from 'IS_ERR'
if (IS_ERR(dent))
^~~~~~~~~~~~
fs/gfs2/dir.c:2177:2: note: Taking false branch
if (IS_ERR(dent))
^
fs/gfs2/dir.c:2180:6: note: Assuming field 'save_loc' is 0
if (da->save_loc) {
^~~~~~~~~~~~
fs/gfs2/dir.c:2180:2: note: Taking false branch
if (da->save_loc) {
^
fs/gfs2/dir.c:2184:3: note: 1st function call argument is an uninitialized value
brelse(bh);
^ ~~
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.
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.
net/core/net-sysfs.c:1719:2: warning: Value stored to 'txq' is never read [clang-analyzer-deadcode.DeadStores]
txq = real_tx;
^ ~~~~~~~
net/core/net-sysfs.c:1719:2: note: Value stored to 'txq' is never read
txq = real_tx;
^ ~~~~~~~
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.
37 warnings generated.
Suppressed 37 warnings (37 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.
>> net/compat.c:444:5: warning: Assigned value is garbage or undefined [clang-analyzer-core.uninitialized.Assign]
a0 = a[0];
^
net/compat.c:424:1: note: Calling '__se_compat_sys_socketcall'
COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args)
^
include/linux/compat.h:55:2: note: expanded from macro 'COMPAT_SYSCALL_DEFINE2'
COMPAT_SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:206:2: note: expanded from macro 'COMPAT_SYSCALL_DEFINEx'
__X32_COMPAT_SYS_STUBx(x, name, __VA_ARGS__) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:172:2: note: expanded from macro '__X32_COMPAT_SYS_STUBx'
__SYS_STUBx(x64, compat_sys##name, \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:79:10: note: expanded from macro '__SYS_STUBx'
return __se_##name(__VA_ARGS__); \
^~~~~~~~~~~~~~~~~~~~~~~~
note: expanded from here
net/compat.c:424:1: note: Calling '__do_compat_sys_socketcall'
COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args)
^
include/linux/compat.h:55:2: note: expanded from macro 'COMPAT_SYSCALL_DEFINE2'
COMPAT_SYSCALL_DEFINEx(2, _##name, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/x86/include/asm/syscall_wrapper.h:209:10: note: expanded from macro 'COMPAT_SYSCALL_DEFINEx'
return __do_compat_sys##name(__MAP(x,__SC_DELOUSE,__VA_ARGS__));\
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
note: expanded from here
net/compat.c:431:6: note: Assuming 'call' is >= SYS_SOCKET
if (call < SYS_SOCKET || call > SYS_SENDMMSG)
^~~~~~~~~~~~~~~~~
net/compat.c:431:6: note: Left side of '||' is false
net/compat.c:431:27: note: Assuming 'call' is <= SYS_SENDMMSG
if (call < SYS_SOCKET || call > SYS_SENDMMSG)
^~~~~~~~~~~~~~~~~~~
net/compat.c:431:2: note: Taking false branch
if (call < SYS_SOCKET || call > SYS_SENDMMSG)
^
net/compat.c:434:6: note: Assuming the condition is false
if (len > sizeof(a))
^~~~~~~~~~~~~~~
net/compat.c:434:2: note: Taking false branch
if (len > sizeof(a))
^
net/compat.c:437:6: note: Calling 'copy_from_user'
if (copy_from_user(a, args, len))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/uaccess.h:191:13: note: Calling 'check_copy_size'
if (likely(check_copy_size(to, n, false)))
^
include/linux/compiler.h:77:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
include/linux/thread_info.h:207:15: note: Assuming 'sz' is >= 0
if (unlikely(sz >= 0 && sz < bytes)) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/thread_info.h:207:15: note: Left side of '&&' is true
if (unlikely(sz >= 0 && sz < bytes)) {
^
include/linux/thread_info.h:207:26: note: Assuming 'sz' is < 'bytes', which participates in a condition later
if (unlikely(sz >= 0 && sz < bytes)) {
^
include/linux/compiler.h:78:42: note: expanded from macro 'unlikely'
# define unlikely(x) __builtin_expect(!!(x), 0)
^
include/linux/thread_info.h:207:2: note: Taking true branch
if (unlikely(sz >= 0 && sz < bytes)) {
^
include/linux/thread_info.h:208:3: note: Taking true branch
if (!__builtin_constant_p(bytes))
^
include/linux/uaccess.h:191:13: note: Returning from 'check_copy_size'
if (likely(check_copy_size(to, n, false)))
^
include/linux/compiler.h:77:40: note: expanded from macro 'likely'
# define likely(x) __builtin_expect(!!(x), 1)
^
include/linux/uaccess.h:191:2: note: Taking false branch
if (likely(check_copy_size(to, n, false)))
^
include/linux/uaccess.h:193:2: note: Returning without writing to '*to'
return n;
^
include/linux/uaccess.h:193:2: note: Returning value (loaded from 'n'), which participates in a condition later
return n;
^~~~~~~~
net/compat.c:437:6: note: Returning from 'copy_from_user'
if (copy_from_user(a, args, len))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/compat.c:437:6: note: Assuming the condition is false
if (copy_from_user(a, args, len))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~
net/compat.c:437:2: note: Taking false branch
if (copy_from_user(a, args, len))
^
net/compat.c:440:8: note: Calling 'audit_socketcall_compat'
ret = audit_socketcall_compat(len / sizeof(a[0]), a);
vim +444 net/compat.c
157b334aa84dc5 Dominik Brodowski 2018-03-16 423
361d93c46f688d Heiko Carstens 2014-03-03 424 COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args)
^1da177e4c3f41 Linus Torvalds 2005-04-16 425 {
62bc306e208343 Richard Guy Briggs 2017-01-17 426 u32 a[AUDITSC_ARGS];
62bc306e208343 Richard Guy Briggs 2017-01-17 427 unsigned int len;
^1da177e4c3f41 Linus Torvalds 2005-04-16 428 u32 a0, a1;
62bc306e208343 Richard Guy Briggs 2017-01-17 429 int ret;
^1da177e4c3f41 Linus Torvalds 2005-04-16 430
228e548e602061 Anton Blanchard 2011-05-02 431 if (call < SYS_SOCKET || call > SYS_SENDMMSG)
^1da177e4c3f41 Linus Torvalds 2005-04-16 432 return -EINVAL;
62bc306e208343 Richard Guy Briggs 2017-01-17 433 len = nas[call];
62bc306e208343 Richard Guy Briggs 2017-01-17 434 if (len > sizeof(a))
62bc306e208343 Richard Guy Briggs 2017-01-17 435 return -EINVAL;
62bc306e208343 Richard Guy Briggs 2017-01-17 436
62bc306e208343 Richard Guy Briggs 2017-01-17 437 if (copy_from_user(a, args, len))
^1da177e4c3f41 Linus Torvalds 2005-04-16 438 return -EFAULT;
62bc306e208343 Richard Guy Briggs 2017-01-17 439
62bc306e208343 Richard Guy Briggs 2017-01-17 440 ret = audit_socketcall_compat(len / sizeof(a[0]), a);
62bc306e208343 Richard Guy Briggs 2017-01-17 441 if (ret)
62bc306e208343 Richard Guy Briggs 2017-01-17 442 return ret;
62bc306e208343 Richard Guy Briggs 2017-01-17 443
^1da177e4c3f41 Linus Torvalds 2005-04-16 @444 a0 = a[0];
:::::: The code at line 444 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 2 weeks
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:124:2: warning: Value stored to 'speakers' is never read [clang-analyzer-deadcode.DeadStores]
by kernel test robot
CC: llvm(a)lists.linux.dev
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Fangzhi Zuo <Jerry.Zuo(a)amd.com>
CC: Alex Deucher <alexander.deucher(a)amd.com>
CC: Nicholas Kazlauskas <Nicholas.Kazlauskas(a)amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d58071a8a76d779eedab38033ae4c821c30295a5
commit: 61452908a79ec936660494fb4b9f2a35ee42e6e0 drm/amd/display: Add DP 2.0 Audio Package Generator
date: 3 months ago
:::::: branch date: 22 hours ago
:::::: commit date: 3 months ago
config: x86_64-randconfig-c007-20211128 (https://download.01.org/0day-ci/archive/20211130/202111300439.S9nMj4kS-lk...)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5162b558d8c0b542e752b037e72a69d5fd51eb1e)
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...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout 61452908a79ec936660494fb4b9f2a35ee42e6e0
# 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(a)intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
^~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1557:11: note: Returning from 'amdgpu_vm_level_shift'
shift = amdgpu_vm_level_shift(adev, cursor.level);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1557:3: note: The value 4294967295 is assigned to 'shift'
shift = amdgpu_vm_level_shift(adev, cursor.level);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1559:15: note: Field 'unlocked' is true
if (params->unlocked) {
^
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1559:3: note: Taking true branch
if (params->unlocked) {
^
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1561:8: note: Assuming the condition is false
if (amdgpu_vm_pt_descendant(adev, &cursor))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1561:4: note: Taking false branch
if (amdgpu_vm_pt_descendant(adev, &cursor))
^
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1588:7: note: Assuming 'pt' is non-null
if (!pt) {
^~~
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1588:3: note: Taking false branch
if (!pt) {
^
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c:1606:41: note: The result of the left shift is undefined due to shifting by '4294967295', which is greater or equal to the width of type 'uint64_t'
incr = (uint64_t)AMDGPU_GPU_PAGE_SIZE << shift;
^ ~~~~~
Suppressed 8 warnings (8 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.
17 warnings generated.
Suppressed 17 warnings (9 in non-user code, 8 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
12 warnings generated.
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2882:6: warning: Access to field 'disable_edc_leakage_controller' results in a dereference of a null pointer (loaded from variable 'data') [clang-analyzer-core.NullDereference]
if (data->disable_edc_leakage_controller)
^
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2914:6: note: Assuming 'data' is not equal to NULL
if (data == NULL)
^~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2914:2: note: Taking false branch
if (data == NULL)
^
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2918:2: note: Calling 'smu7_patch_voltage_workaround'
smu7_patch_voltage_workaround(hwmgr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2451:6: note: Assuming 'table_info' is equal to NULL
if (table_info != NULL) {
^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2451:2: note: Taking false branch
if (table_info != NULL) {
^
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2455:3: note: Returning without writing to 'hwmgr->backend'
return 0;
^
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2918:2: note: Returning from 'smu7_patch_voltage_workaround'
smu7_patch_voltage_workaround(hwmgr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2922:2: note: Taking false branch
if (phm_cap_enabled(hwmgr->platform_descriptor.platformCaps,
^
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2933:6: note: Assuming field 'pp_table_version' is not equal to PP_TABLE_V1
if (hwmgr->pp_table_version == PP_TABLE_V1) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2933:2: note: Taking false branch
if (hwmgr->pp_table_version == PP_TABLE_V1) {
^
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2936:13: note: Assuming field 'pp_table_version' is not equal to PP_TABLE_V0
} else if (hwmgr->pp_table_version == PP_TABLE_V0) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2936:9: note: Taking false branch
} else if (hwmgr->pp_table_version == PP_TABLE_V0) {
^
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2944:6: note: Assuming 'result' is not equal to 0
if (0 == result) {
^~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2944:2: note: Taking false branch
if (0 == result) {
^
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2968:3: note: Calling 'smu7_hwmgr_backend_fini'
smu7_hwmgr_backend_fini(hwmgr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2839:2: note: Null pointer value stored to field 'backend'
hwmgr->backend = NULL;
^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2968:3: note: Returning from 'smu7_hwmgr_backend_fini'
smu7_hwmgr_backend_fini(hwmgr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2971:11: note: Calling 'smu7_update_edc_leakage_table'
result = smu7_update_edc_leakage_table(hwmgr);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2877:2: note: 'data' initialized to a null pointer value
struct smu7_hwmgr *data = (struct smu7_hwmgr *)(hwmgr->backend);
^~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../pm/powerplay/hwmgr/smu7_hwmgr.c:2882:6: note: Access to field 'disable_edc_leakage_controller' results in a dereference of a null pointer (loaded from variable 'data')
if (data->disable_edc_leakage_controller)
^~~~
Suppressed 11 warnings (10 in non-user code, 1 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:124:2: warning: Value stored to 'speakers' is never read [clang-analyzer-deadcode.DeadStores]
speakers = audio_info->flags.info.ALLSPEAKERS;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:124:2: note: Value stored to 'speakers' is never read
speakers = audio_info->flags.info.ALLSPEAKERS;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:125:2: warning: Value stored to 'channels' is never read [clang-analyzer-deadcode.DeadStores]
channels = speakers_to_channels(audio_info->flags.speaker_flags).all;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c:125:2: note: Value stored to 'channels' is never read
channels = speakers_to_channels(audio_info->flags.speaker_flags).all;
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Suppressed 5 warnings (3 in non-user code, 2 with check filters).
Use -header-filter=.* to display errors from all non-system headers. Use -system-headers to display errors from system headers as well.
7 warnings generated.
Suppressed 7 warnings (7 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.
7 warnings generated.
Suppressed 7 warnings (7 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.
7 warnings generated.
Suppressed 7 warnings (7 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.
fs/nfs/nfs4session.c:127:10: warning: The left operand of '==' is a garbage value [clang-analyzer-core.UndefinedBinaryOperatorResult]
if (*p == NULL) {
^
fs/nfs/nfs4session.c:405:2: note: Loop condition is true. Entering loop body
for (;;) {
^
fs/nfs/nfs4session.c:406:8: note: Calling 'nfs41_try_wake_next_slot_table_entry'
if (!nfs41_try_wake_next_slot_table_entry(tbl))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfs/nfs4session.c:393:27: note: Calling 'nfs4_alloc_slot'
struct nfs4_slot *slot = nfs4_alloc_slot(tbl);
^~~~~~~~~~~~~~~~~~~~
fs/nfs/nfs4session.c:247:2: note: Loop condition is false. Exiting loop
dprintk("--> %s used_slots=%04lx highest_used=%u max_slots=%u\n",
^
include/linux/sunrpc/debug.h:25:2: note: expanded from macro 'dprintk'
dfprintk(FACILITY, fmt, ##__VA_ARGS__)
^
include/linux/sunrpc/debug.h:70:34: note: expanded from macro 'dfprintk'
# define dfprintk(fac, fmt, ...) do {} while (0)
^
fs/nfs/nfs4session.c:251:6: note: Assuming 'slotid' is <= field 'max_slotid'
if (slotid <= tbl->max_slotid) {
^~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfs/nfs4session.c:251:2: note: Taking true branch
if (slotid <= tbl->max_slotid) {
^
fs/nfs/nfs4session.c:252:9: note: Calling 'nfs4_find_or_create_slot'
ret = nfs4_find_or_create_slot(tbl, slotid, 1, GFP_NOWAIT);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfs/nfs4session.c:126:2: note: Loop condition is true. Entering loop body
for (;;) {
^
fs/nfs/nfs4session.c:127:7: note: Assuming the condition is true
if (*p == NULL) {
^~~~~~~~~~
fs/nfs/nfs4session.c:127:3: note: Taking true branch
if (*p == NULL) {
^
fs/nfs/nfs4session.c:128:9: note: Calling 'nfs4_new_slot'
*p = nfs4_new_slot(tbl, tbl->max_slots,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfs/nfs4session.c:109:9: note: Calling 'kzalloc'
slot = kzalloc(sizeof(*slot), gfp_mask);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/slab.h:721:9: note: Uninitialized value stored to field 'next'
return kmalloc(size, flags | __GFP_ZERO);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfs/nfs4session.c:109:9: note: Returning from 'kzalloc'
slot = kzalloc(sizeof(*slot), gfp_mask);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfs/nfs4session.c:110:6: note: Assuming 'slot' is non-null
if (slot) {
^~~~
fs/nfs/nfs4session.c:110:2: note: Taking true branch
if (slot) {
^
fs/nfs/nfs4session.c:128:9: note: Returning from 'nfs4_new_slot'
*p = nfs4_new_slot(tbl, tbl->max_slots,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/nfs/nfs4session.c:130:4: note: Taking false branch
if (*p == NULL)
^
fs/nfs/nfs4session.c:135:7: note: Assuming 'slotid' is not equal to field 'slot_nr'
if (slot->slot_nr == slotid)
^~~~~~~~~~~~~~~~~~~~~~~
fs/nfs/nfs4session.c:135:3: note: Taking false branch
if (slot->slot_nr == slotid)
^
fs/nfs/nfs4session.c:126:2: note: Loop condition is true. Entering loop body
for (;;) {
vim +/speakers +124 drivers/gpu/drm/amd/amdgpu/../display/dc/dcn31/dcn31_apg.c
61452908a79ec9 Fangzhi Zuo 2021-06-09 108
61452908a79ec9 Fangzhi Zuo 2021-06-09 109 static void apg31_se_audio_setup(
61452908a79ec9 Fangzhi Zuo 2021-06-09 110 struct apg *apg,
61452908a79ec9 Fangzhi Zuo 2021-06-09 111 unsigned int az_inst,
61452908a79ec9 Fangzhi Zuo 2021-06-09 112 struct audio_info *audio_info)
61452908a79ec9 Fangzhi Zuo 2021-06-09 113 {
61452908a79ec9 Fangzhi Zuo 2021-06-09 114 struct dcn31_apg *apg31 = DCN31_APG_FROM_APG(apg);
61452908a79ec9 Fangzhi Zuo 2021-06-09 115
61452908a79ec9 Fangzhi Zuo 2021-06-09 116 uint32_t speakers = 0;
61452908a79ec9 Fangzhi Zuo 2021-06-09 117 uint32_t channels = 0;
61452908a79ec9 Fangzhi Zuo 2021-06-09 118
61452908a79ec9 Fangzhi Zuo 2021-06-09 119 ASSERT(audio_info);
61452908a79ec9 Fangzhi Zuo 2021-06-09 120 /* This should not happen.it does so we don't get BSOD*/
61452908a79ec9 Fangzhi Zuo 2021-06-09 121 if (audio_info == NULL)
61452908a79ec9 Fangzhi Zuo 2021-06-09 122 return;
61452908a79ec9 Fangzhi Zuo 2021-06-09 123
61452908a79ec9 Fangzhi Zuo 2021-06-09 @124 speakers = audio_info->flags.info.ALLSPEAKERS;
61452908a79ec9 Fangzhi Zuo 2021-06-09 @125 channels = speakers_to_channels(audio_info->flags.speaker_flags).all;
61452908a79ec9 Fangzhi Zuo 2021-06-09 126
61452908a79ec9 Fangzhi Zuo 2021-06-09 127 /* DisplayPort only allows for one audio stream with stream ID 0 */
61452908a79ec9 Fangzhi Zuo 2021-06-09 128 REG_UPDATE(APG_CONTROL2, APG_DP_AUDIO_STREAM_ID, 0);
61452908a79ec9 Fangzhi Zuo 2021-06-09 129
61452908a79ec9 Fangzhi Zuo 2021-06-09 130 /* When running in "pair mode", pairs of audio channels have their own enable
61452908a79ec9 Fangzhi Zuo 2021-06-09 131 * this is for really old audio drivers */
61452908a79ec9 Fangzhi Zuo 2021-06-09 132 REG_UPDATE(APG_DBG_GEN_CONTROL, APG_DBG_AUDIO_CHANNEL_ENABLE, 0xF);
61452908a79ec9 Fangzhi Zuo 2021-06-09 133 // REG_UPDATE(APG_DBG_GEN_CONTROL, APG_DBG_AUDIO_CHANNEL_ENABLE, channels);
61452908a79ec9 Fangzhi Zuo 2021-06-09 134
61452908a79ec9 Fangzhi Zuo 2021-06-09 135 /* Disable forced mem power off */
61452908a79ec9 Fangzhi Zuo 2021-06-09 136 REG_UPDATE(APG_MEM_PWR, APG_MEM_PWR_FORCE, 0);
61452908a79ec9 Fangzhi Zuo 2021-06-09 137
61452908a79ec9 Fangzhi Zuo 2021-06-09 138 apg31_enable(apg);
61452908a79ec9 Fangzhi Zuo 2021-06-09 139 }
61452908a79ec9 Fangzhi Zuo 2021-06-09 140
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
8 months, 2 weeks