[kbuild] [android-common:android-5.4 3/3] fs/namei.c:811:17-24: ERROR: reference preceded by free on line 799

2020-06-02 Thread kbuild test robot
CC: kbuild-...@lists.01.org
TO: cros-kernel-buildrepo...@googlegroups.com

tree:   https://android.googlesource.com/kernel/common android-5.4
head:   ff2d9520b4aa4a23e2c9e37b6a5ca255d6f5715e
commit: ff2d9520b4aa4a23e2c9e37b6a5ca255d6f5715e [3/3] ANDROID: Add a 
tracepoint for mapping inode to full path
:: branch date: 5 months ago
:: commit date: 5 months ago
config: x86_64-randconfig-c002-20200602 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Julia Lawall 


coccinelle warnings: (new ones prefixed by >>)

>> fs/namei.c:811:17-24: ERROR: reference preceded by free on line 799

git remote add android-common https://android.googlesource.com/kernel/common
git remote update android-common
git checkout ff2d9520b4aa4a23e2c9e37b6a5ca255d6f5715e
vim +811 fs/namei.c

ff2d9520b4aa4a Joel Fernandes 2019-03-14  777  
ff2d9520b4aa4a Joel Fernandes 2019-03-14  778  static void 
success_walk_trace(struct nameidata *nd)
ff2d9520b4aa4a Joel Fernandes 2019-03-14  779  {
ff2d9520b4aa4a Joel Fernandes 2019-03-14  780   struct path *pt = >path;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  781   struct inode *i = nd->inode;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  782   char buf[INIT_PATH_SIZE], 
*try_buf;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  783   int cur_path_size;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  784   char *p;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  785  
ff2d9520b4aa4a Joel Fernandes 2019-03-14  786   /* When eBPF/ tracepoint is 
disabled, keep overhead low. */
ff2d9520b4aa4a Joel Fernandes 2019-03-14  787   if (!trace_inodepath_enabled())
ff2d9520b4aa4a Joel Fernandes 2019-03-14  788   return;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  789  
ff2d9520b4aa4a Joel Fernandes 2019-03-14  790   /* First try stack allocated 
buffer. */
ff2d9520b4aa4a Joel Fernandes 2019-03-14  791   try_buf = buf;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  792   cur_path_size = INIT_PATH_SIZE;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  793  
ff2d9520b4aa4a Joel Fernandes 2019-03-14  794   while (cur_path_size <= 
PATH_MAX) {
ff2d9520b4aa4a Joel Fernandes 2019-03-14  795   /* Free previous heap 
allocation if we are now trying
ff2d9520b4aa4a Joel Fernandes 2019-03-14  796* a second or later 
heap allocation.
ff2d9520b4aa4a Joel Fernandes 2019-03-14  797*/
ff2d9520b4aa4a Joel Fernandes 2019-03-14  798   if (try_buf != buf)
ff2d9520b4aa4a Joel Fernandes 2019-03-14 @799   kfree(try_buf);
ff2d9520b4aa4a Joel Fernandes 2019-03-14  800  
ff2d9520b4aa4a Joel Fernandes 2019-03-14  801   /* All but the first 
alloc are on the heap. */
ff2d9520b4aa4a Joel Fernandes 2019-03-14  802   if (cur_path_size != 
INIT_PATH_SIZE) {
ff2d9520b4aa4a Joel Fernandes 2019-03-14  803   try_buf = 
kmalloc(cur_path_size, GFP_KERNEL);
ff2d9520b4aa4a Joel Fernandes 2019-03-14  804   if (!try_buf) {
ff2d9520b4aa4a Joel Fernandes 2019-03-14  805   try_buf 
= buf;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  806   
sprintf(try_buf, "error:buf_alloc_failed");
ff2d9520b4aa4a Joel Fernandes 2019-03-14  807   break;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  808   }
ff2d9520b4aa4a Joel Fernandes 2019-03-14  809   }
ff2d9520b4aa4a Joel Fernandes 2019-03-14  810  
ff2d9520b4aa4a Joel Fernandes 2019-03-14 @811   p = d_path(pt, try_buf, 
cur_path_size);
ff2d9520b4aa4a Joel Fernandes 2019-03-14  812  
ff2d9520b4aa4a Joel Fernandes 2019-03-14  813   if (!IS_ERR(p)) {
ff2d9520b4aa4a Joel Fernandes 2019-03-14  814   char *end = 
mangle_path(try_buf, p, "\n");
ff2d9520b4aa4a Joel Fernandes 2019-03-14  815  
ff2d9520b4aa4a Joel Fernandes 2019-03-14  816   if (end) {
ff2d9520b4aa4a Joel Fernandes 2019-03-14  817   
try_buf[end - try_buf] = 0;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  818   break;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  819   } else {
ff2d9520b4aa4a Joel Fernandes 2019-03-14  820   /* On 
mangle errors, double path size
ff2d9520b4aa4a Joel Fernandes 2019-03-14  821* till 
PATH_MAX.
ff2d9520b4aa4a Joel Fernandes 2019-03-14  822*/
ff2d9520b4aa4a Joel Fernandes 2019-03-14  823   
cur_path_size = cur_path_size << 1;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  824   
continue;
ff2d9520b4aa4a Joel Fernandes 2019-03-14  825   }
ff2d9520b4aa4a Joel Fernandes 2019-03-14  826   }
ff2d9520b4aa4a Joel Fernandes 2019-03-14  827  
ff2d9520b4aa4a Joel Fernandes 2019-03-14  828   if (PTR_ERR(p) == 
-ENAMETOOLONG) 

[kbuild] [yao:perf-intel-next 27/113] arch/x86/events/intel/uncore.c:1600 check_discovery_table() error: uninitialized symbol 'dvsec'.

2020-06-02 Thread Dan Carpenter
tree:   yao/perf-intel-next
head:   36086096ecdcd11f5dfc73d2780537e2483ac70b
commit: 7033482bbd4f555901cbe7f5e8fbcc8a2618851f [27/113] 
perf/x86/intel/uncore: Check discovery tables
config: i386-randconfig-m021-20200602 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Dan Carpenter 

smatch warnings:
arch/x86/events/intel/uncore.c:1600 check_discovery_table() error: 
uninitialized symbol 'dvsec'.

git remote add yao git://bee.sh.intel.com/git/jinyao/linux.git
git remote update yao
git checkout 7033482bbd4f555901cbe7f5e8fbcc8a2618851f
vim +/dvsec +1600 arch/x86/events/intel/uncore.c

7033482bbd4f55 Kan Liang 2020-04-13  1586  
7033482bbd4f55 Kan Liang 2020-04-13  1587  bool __init 
check_discovery_table(void)
7033482bbd4f55 Kan Liang 2020-04-13  1588  {
7033482bbd4f55 Kan Liang 2020-04-13  1589   struct uncore_discovery_table 
*table;
7033482bbd4f55 Kan Liang 2020-04-13  1590   struct pci_dev *dev = NULL;
7033482bbd4f55 Kan Liang 2020-04-13  1591   int dvsec, logical_die = 0;
^

7033482bbd4f55 Kan Liang 2020-04-13  1592   u32 val, entry_id, bir;
7033482bbd4f55 Kan Liang 2020-04-13  1593   bool ret = false;
7033482bbd4f55 Kan Liang 2020-04-13  1594  
7033482bbd4f55 Kan Liang 2020-04-13  1595   /*
7033482bbd4f55 Kan Liang 2020-04-13  1596* Check the existence of 
discovery table by searching all PCI devices
7033482bbd4f55 Kan Liang 2020-04-13  1597* for unique capability ID.
7033482bbd4f55 Kan Liang 2020-04-13  1598*/
7033482bbd4f55 Kan Liang 2020-04-13  1599   while ((dev = 
pci_get_device(PCI_VENDOR_ID_INTEL, PCI_ANY_ID, dev)) != NULL) {
7033482bbd4f55 Kan Liang 2020-04-13 @1600   while ((dvsec = 
pci_find_next_ext_capability(dev, dvsec, UNCORE_EXT_CAP_ID_DISCOVERY))) {

  ^
Uninitialized here.  KASAN will trigger a warning at runtime as well.

7033482bbd4f55 Kan Liang 2020-04-13  1601   
pci_read_config_dword(dev, dvsec + UNCORE_DISCOVERY_DVSEC_OFFSET, );
7033482bbd4f55 Kan Liang 2020-04-13  1602   entry_id = val 
& UNCORE_DISCOVERY_DVSEC_ID_MASK;
7033482bbd4f55 Kan Liang 2020-04-13  1603   if (entry_id == 
UNCORE_DISCOVERY_DVSEC_ID_PMON) {
7033482bbd4f55 Kan Liang 2020-04-13  1604   table = 
kmalloc(sizeof(struct uncore_discovery_table), GFP_KERNEL);
7033482bbd4f55 Kan Liang 2020-04-13  1605   if 
(!table)
7033482bbd4f55 Kan Liang 2020-04-13  1606   
continue;
7033482bbd4f55 Kan Liang 2020-04-13  1607   
pci_read_config_dword(dev, dvsec + UNCORE_DISCOVERY_DVSEC2_OFFSET, );
7033482bbd4f55 Kan Liang 2020-04-13  1608   bir = 
val & UNCORE_DISCOVERY_DVSEC2_BIR_MASK;
7033482bbd4f55 Kan Liang 2020-04-13  1609   
table->domain = pci_domain_nr(dev->bus);
7033482bbd4f55 Kan Liang 2020-04-13  1610   
table->bus = dev->bus->number;
7033482bbd4f55 Kan Liang 2020-04-13  1611   
table->devfn = dev->devfn;
7033482bbd4f55 Kan Liang 2020-04-13  1612   
table->bar_offset = 0x10 + (bir * 4);
7033482bbd4f55 Kan Liang 2020-04-13  1613   
table->die = logical_die++;
7033482bbd4f55 Kan Liang 2020-04-13  1614   if 
(discovery_table_pci2phy_map_init(dev, table->die)) {
7033482bbd4f55 Kan Liang 2020-04-13  1615   
kfree(table);
7033482bbd4f55 Kan Liang 2020-04-13  1616   
continue;
7033482bbd4f55 Kan Liang 2020-04-13  1617   }
7033482bbd4f55 Kan Liang 2020-04-13  1618   
list_add_tail(>list, _table);
7033482bbd4f55 Kan Liang 2020-04-13  1619   ret = 
true;
7033482bbd4f55 Kan Liang 2020-04-13  1620   
continue;
7033482bbd4f55 Kan Liang 2020-04-13  1621   }
7033482bbd4f55 Kan Liang 2020-04-13  1622   }
7033482bbd4f55 Kan Liang 2020-04-13  1623   }
7033482bbd4f55 Kan Liang 2020-04-13  1624   pci_dev_put(dev);
7033482bbd4f55 Kan Liang 2020-04-13  1625  
7033482bbd4f55 Kan Liang 2020-04-13  1626   
fill_up_pbus_to_physid_mapping(true);
7033482bbd4f55 Kan Liang 2020-04-13  1627  
7033482bbd4f55 Kan Liang 2020-04-13  1628   return ret;
7033482bbd4f55 Kan Liang 2020-04-13  1629  }

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


.config.gz
Description: application/gzip
_

[kbuild] arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: should '(pci_dword & 536870911) << 23' be a 64 bit type?

2020-06-02 Thread Dan Carpenter
tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   3d77e6a8804abcc0504c904bd6e5cdf3a5cf8162
commit: 3442a9ecb8e72a33c28a2b969b766c659830e410 perf/x86/intel/uncore: Factor 
out __snr_uncore_mmio_init_box
date:   2 months ago
config: x86_64-randconfig-m001-20200601 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Dan Carpenter 

smatch warnings:
arch/x86/events/intel/uncore_snbep.c:4394 __snr_uncore_mmio_init_box() warn: 
should '(pci_dword & 536870911) << 23' be a 64 bit type?

# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=3442a9ecb8e72a33c28a2b969b766c659830e410
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout 3442a9ecb8e72a33c28a2b969b766c659830e410
vim +4394 arch/x86/events/intel/uncore_snbep.c

3442a9ecb8e72a Kan Liang 2020-03-17  4383  static void 
__snr_uncore_mmio_init_box(struct intel_uncore_box *box,
3442a9ecb8e72a Kan Liang 2020-03-17  4384  
unsigned int box_ctl, int mem_offset)
ee49532b38dd08 Kan Liang 2019-04-30  4385  {
ee49532b38dd08 Kan Liang 2019-04-30  4386   struct pci_dev *pdev = 
snr_uncore_get_mc_dev(box->dieid);
ee49532b38dd08 Kan Liang 2019-04-30  4387   resource_size_t addr;
ee49532b38dd08 Kan Liang 2019-04-30  4388   u32 pci_dword;
ee49532b38dd08 Kan Liang 2019-04-30  4389  
ee49532b38dd08 Kan Liang 2019-04-30  4390   if (!pdev)
ee49532b38dd08 Kan Liang 2019-04-30  4391   return;
ee49532b38dd08 Kan Liang 2019-04-30  4392  
ee49532b38dd08 Kan Liang 2019-04-30  4393   pci_read_config_dword(pdev, 
SNR_IMC_MMIO_BASE_OFFSET, _dword);
ee49532b38dd08 Kan Liang 2019-04-30 @4394   addr = (pci_dword & 
SNR_IMC_MMIO_BASE_MASK) << 23;

^^
This check has a pretty high false positive rate because "pci_dword"
is unknowable but obviously SNR_IMC_MMIO_BASE_MASK << 23 is undefined.

ee49532b38dd08 Kan Liang 2019-04-30  4395  
3442a9ecb8e72a Kan Liang 2020-03-17  4396   pci_read_config_dword(pdev, 
mem_offset, _dword);
ee49532b38dd08 Kan Liang 2019-04-30  4397   addr |= (pci_dword & 
SNR_IMC_MMIO_MEM0_MASK) << 12;
ee49532b38dd08 Kan Liang 2019-04-30  4398  
ee49532b38dd08 Kan Liang 2019-04-30  4399   addr += box_ctl;
ee49532b38dd08 Kan Liang 2019-04-30  4400  
ee49532b38dd08 Kan Liang 2019-04-30  4401   box->io_addr = ioremap(addr, 
SNR_IMC_MMIO_SIZE);
ee49532b38dd08 Kan Liang 2019-04-30  4402   if (!box->io_addr)
ee49532b38dd08 Kan Liang 2019-04-30  4403   return;
ee49532b38dd08 Kan Liang 2019-04-30  4404  
ee49532b38dd08 Kan Liang 2019-04-30  4405   writel(IVBEP_PMON_BOX_CTL_INT, 
box->io_addr);
ee49532b38dd08 Kan Liang 2019-04-30  4406  }

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] Re: [PATCH v6] drm/ioctl: Add a ioctl to set and get a label on GEM objects

2020-06-02 Thread Dan Carpenter
Hi Rohan,

url:
https://github.com/0day-ci/linux/commits/Rohan-Garg/drm-ioctl-Add-a-ioctl-to-set-and-get-a-label-on-GEM-objects/20200531-000134
base:   https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git 
exynos-drm-next
config: i386-randconfig-m021-20200531 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/gpu/drm/drm_gem.c:1004 drm_gem_get_label() warn: maybe return -EFAULT 
instead of the bytes remaining?

Old smatch warnings:
drivers/gpu/drm/drm_gem.c:910 drm_gem_open_ioctl() warn: inconsistent returns 
'dev->object_name_lock'.

# 
https://github.com/0day-ci/linux/commit/174b10d2bdba06efe773aa0d09e682a57a00ec67
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 174b10d2bdba06efe773aa0d09e682a57a00ec67
vim +1004 drivers/gpu/drm/drm_gem.c

174b10d2bdba06 Rohan Garg 2020-05-28   979  int drm_gem_get_label(struct 
drm_device *dev, struct drm_file *file_priv,
174b10d2bdba06 Rohan Garg 2020-05-28   980struct 
drm_handle_label *args)
174b10d2bdba06 Rohan Garg 2020-05-28   981  {
174b10d2bdba06 Rohan Garg 2020-05-28   982  struct drm_gem_object *gem_obj;
174b10d2bdba06 Rohan Garg 2020-05-28   983  int len, ret;
174b10d2bdba06 Rohan Garg 2020-05-28   984  
174b10d2bdba06 Rohan Garg 2020-05-28   985  gem_obj = 
drm_gem_object_lookup(file_priv, args->handle);
174b10d2bdba06 Rohan Garg 2020-05-28   986  if (!gem_obj) {
174b10d2bdba06 Rohan Garg 2020-05-28   987  DRM_DEBUG("Failed to 
look up GEM BO %d\n", args->handle);
174b10d2bdba06 Rohan Garg 2020-05-28   988  return -ENOENT;
174b10d2bdba06 Rohan Garg 2020-05-28   989  }
174b10d2bdba06 Rohan Garg 2020-05-28   990  
174b10d2bdba06 Rohan Garg 2020-05-28   991  if (!gem_obj->label) {
174b10d2bdba06 Rohan Garg 2020-05-28   992  args->label = NULL;
174b10d2bdba06 Rohan Garg 2020-05-28   993  args->len = 0;
174b10d2bdba06 Rohan Garg 2020-05-28   994  return 0;
174b10d2bdba06 Rohan Garg 2020-05-28   995  }
174b10d2bdba06 Rohan Garg 2020-05-28   996  
174b10d2bdba06 Rohan Garg 2020-05-28   997  mutex_lock(_obj->bo_lock);
174b10d2bdba06 Rohan Garg 2020-05-28   998  len = strlen(gem_obj->label);
174b10d2bdba06 Rohan Garg 2020-05-28   999  ret = 
copy_to_user(u64_to_user_ptr(args->label), gem_obj->label,
174b10d2bdba06 Rohan Garg 2020-05-28  1000 
min(args->len, len));

copy_to_user() returns the number of bytes remaining to be copied but
this should be:

if (copy_to_user(u64_to_user_ptr(args->label), gem_obj->label,
 min(args->len, len)))
ret = -EFAULT;

Don't forget to initialize "int ret = 0;" because GCC doesn't warn about
it these days...  :/

174b10d2bdba06 Rohan Garg 2020-05-28  1001  mutex_unlock(_obj->bo_lock);
174b10d2bdba06 Rohan Garg 2020-05-28  1002  args->len = len;
174b10d2bdba06 Rohan Garg 2020-05-28  1003  drm_gem_object_put(gem_obj);
174b10d2bdba06 Rohan Garg 2020-05-28 @1004  return ret;
174b10d2bdba06 Rohan Garg 2020-05-28  1005  }

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] [rcu:dev.2020.05.26b 59/70] kernel/rcu/refperf.c:391 main_func() error: we previously assumed 'buf' could be null (see line 348)

2020-06-02 Thread kbuild test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: "Paul, E., McKenney," 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git 
dev.2020.05.26b
head:   795279db1396bf66621fa3f343fa990fe543b89e
commit: 7e2a6278a303f510883b32c1ac2d5ea7351b7e1d [59/70] refperf: Dynamically 
allocate experiment-summary output buffer
:: branch date: 6 days ago
:: commit date: 6 days ago
config: x86_64-randconfig-m001-20200602 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Dan Carpenter 

smatch warnings:
kernel/rcu/refperf.c:391 main_func() error: we previously assumed 'buf' could 
be null (see line 348)

# 
https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git/commit/?id=7e2a6278a303f510883b32c1ac2d5ea7351b7e1d
git remote add rcu 
https://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu.git
git remote update rcu
git checkout 7e2a6278a303f510883b32c1ac2d5ea7351b7e1d
vim +/buf +391 kernel/rcu/refperf.c

786a2549774369 Joel Fernandes (Google  2020-05-25  325) 
786a2549774369 Joel Fernandes (Google  2020-05-25  326) // The main_func is the 
main orchestrator, it performs a bunch of
786a2549774369 Joel Fernandes (Google  2020-05-25  327) // experiments.  For 
every experiment, it orders all the readers
786a2549774369 Joel Fernandes (Google  2020-05-25  328) // involved to start 
and waits for them to finish the experiment. It
786a2549774369 Joel Fernandes (Google  2020-05-25  329) // then reads their 
timestamps and starts the next experiment. Each
786a2549774369 Joel Fernandes (Google  2020-05-25  330) // experiment 
progresses from 1 concurrent reader to N of them at which
786a2549774369 Joel Fernandes (Google  2020-05-25  331) // point all the 
timestamps are printed.
786a2549774369 Joel Fernandes (Google  2020-05-25  332) static int 
main_func(void *arg)
786a2549774369 Joel Fernandes (Google  2020-05-25  333) {
7e2a6278a303f5 Paul E. McKenney2020-05-25  334  bool errexit = 
false;
786a2549774369 Joel Fernandes (Google  2020-05-25  335) int exp, r;
786a2549774369 Joel Fernandes (Google  2020-05-25  336) char buf1[64];
7e2a6278a303f5 Paul E. McKenney2020-05-25  337  char *buf;
e4c9f422a8f55a Paul E. McKenney2020-05-25  338  u64 *result_avg;
786a2549774369 Joel Fernandes (Google  2020-05-25  339) 
786a2549774369 Joel Fernandes (Google  2020-05-25  340) 
set_cpus_allowed_ptr(current, cpumask_of(nreaders % nr_cpu_ids));
786a2549774369 Joel Fernandes (Google  2020-05-25  341) 
set_user_nice(current, MAX_NICE);
786a2549774369 Joel Fernandes (Google  2020-05-25  342) 
0df40fd6b88e49 Paul E. McKenney2020-05-25  343  if (holdoff)
0df40fd6b88e49 Paul E. McKenney2020-05-25  344  
schedule_timeout_interruptible(holdoff * HZ);
786a2549774369 Joel Fernandes (Google  2020-05-25  345) 
VERBOSE_PERFOUT("main_func task started");
e4c9f422a8f55a Paul E. McKenney2020-05-25  346  result_avg = 
kzalloc(nruns * sizeof(*result_avg), GFP_KERNEL);
7e2a6278a303f5 Paul E. McKenney2020-05-25  347  buf = 
kzalloc(64 + nruns * 32, GFP_KERNEL);
7e2a6278a303f5 Paul E. McKenney2020-05-25 @348  if (!result_avg 
|| !buf) {
e4c9f422a8f55a Paul E. McKenney2020-05-25  349  
VERBOSE_PERFOUT_ERRSTRING("out of memory");
7e2a6278a303f5 Paul E. McKenney2020-05-25  350  errexit 
= true;
7e2a6278a303f5 Paul E. McKenney2020-05-25  351  }
786a2549774369 Joel Fernandes (Google  2020-05-25  352) 
atomic_inc(_init);
786a2549774369 Joel Fernandes (Google  2020-05-25  353) 
786a2549774369 Joel Fernandes (Google  2020-05-25  354) // Wait for all 
threads to start.
786a2549774369 Joel Fernandes (Google  2020-05-25  355) 
wait_event(main_wq, atomic_read(_init) == (nreaders + 1));
786a2549774369 Joel Fernandes (Google  2020-05-25  356) 
786a2549774369 Joel Fernandes (Google  2020-05-25  357) // Start exp 
readers up per experiment
e4c9f422a8f55a Paul E. McKenney2020-05-25  358  for (exp = 0; 
exp < nruns && !torture_must_stop(); exp++) {
7e2a6278a303f5 Paul E. McKenney2020-05-25  359  if 
(errexit)
e4c9f422a8f55a Paul E. McKenney2020-05-25  360  
break;
786a2549774369 Joel Fernandes (Google  2020-05-25  361) if 
(torture_must_stop())
786a2549774369 Joel Fernandes (Google  2020-05-25  362) 
goto end;
786a2549774369 Joel Fernandes (Google  2020-05-25  363) 
e4c9f422a8f55a Paul E. McKenney2020-05-25  364  
reset_readers();
e4c9f422a8f55a Paul E. McKenney2020-05-25  365  
atomic_set(_exp, nreaders);
786a2549774369 Joel Fernandes 

[kbuild] Re: [PATCH] ceph: show max caps in debugfs caps file

2020-06-02 Thread Dan Carpenter
Hi Yanhu,

url:
https://github.com/0day-ci/linux/commits/Yanhu-Cao/ceph-show-max-caps-in-debugfs-caps-file/20200521-190841
base:   https://github.com/ceph/ceph-client.git for-linus
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Dan Carpenter 

smatch warnings:
fs/ceph/debugfs.c:151 caps_show() warn: excess argument passed to 'seq_printf'

# 
https://github.com/0day-ci/linux/commit/d35440110f623b99d201f15fa3cc062a35dc6373
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout d35440110f623b99d201f15fa3cc062a35dc6373
vim +/seq_printf +151 fs/ceph/debugfs.c

76aa844d5b2fb8 Sage Weil2009-10-06  137  static int caps_show(struct 
seq_file *s, void *p)
76aa844d5b2fb8 Sage Weil2009-10-06  138  {
3d14c5d2b6e15c Yehuda Sadeh 2010-04-06  139 struct ceph_fs_client *fsc = 
s->private;
ff4a80bf2d3f80 Jeff Layton  2019-04-24  140 struct ceph_mds_client *mdsc = 
fsc->mdsc;
d35440110f623b Yanhu Cao2020-05-21  141 int total, avail, used, max, 
reserved, min, i;
3a3430affce5de Jeff Layton  2019-11-20  142 struct cap_wait *cw;
76aa844d5b2fb8 Sage Weil2009-10-06  143  
d35440110f623b Yanhu Cao2020-05-21  144 ceph_reservation_status(fsc, 
, , , ,
d35440110f623b Yanhu Cao2020-05-21  145 
, );
76aa844d5b2fb8 Sage Weil2009-10-06  146 seq_printf(s, "total\t\t%d\n"
76aa844d5b2fb8 Sage Weil2009-10-06  147"avail\t\t%d\n"
76aa844d5b2fb8 Sage Weil2009-10-06  148"used\t\t%d\n"

max is missing.

85ccce43a3fc15 Sage Weil2010-02-17  149"reserved\t%d\n"
ff4a80bf2d3f80 Jeff Layton  2019-04-24  150"min\t\t%d\n\n",
d35440110f623b Yanhu Cao2020-05-21 @151total, avail, used, 
max, reserved, min);
   
^^^

ff4a80bf2d3f80 Jeff Layton  2019-04-24  152 seq_printf(s, "ino  
  issued   implemented\n");
ff4a80bf2d3f80 Jeff Layton  2019-04-24  153 seq_printf(s, 
"---\n");
ff4a80bf2d3f80 Jeff Layton  2019-04-24  154  
ff4a80bf2d3f80 Jeff Layton  2019-04-24  155 mutex_lock(>mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  156 for (i = 0; i < 
mdsc->max_sessions; i++) {
ff4a80bf2d3f80 Jeff Layton  2019-04-24  157 struct ceph_mds_session 
*session;
ff4a80bf2d3f80 Jeff Layton  2019-04-24  158  
ff4a80bf2d3f80 Jeff Layton  2019-04-24  159 session = 
__ceph_lookup_mds_session(mdsc, i);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  160 if (!session)
ff4a80bf2d3f80 Jeff Layton  2019-04-24  161 continue;
ff4a80bf2d3f80 Jeff Layton  2019-04-24  162 
mutex_unlock(>mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  163 
mutex_lock(>s_mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  164 
ceph_iterate_session_caps(session, caps_show_cb, s);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  165 
mutex_unlock(>s_mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  166 
ceph_put_mds_session(session);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  167 
mutex_lock(>mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  168 }
ff4a80bf2d3f80 Jeff Layton  2019-04-24  169 mutex_unlock(>mutex);
ff4a80bf2d3f80 Jeff Layton  2019-04-24  170  
3a3430affce5de Jeff Layton  2019-11-20  171 seq_printf(s, 
"\n\nWaiters:\n\n");
3a3430affce5de Jeff Layton  2019-11-20  172 seq_printf(s, "tgid ino 
   need want\n");
3a3430affce5de Jeff Layton  2019-11-20  173 seq_printf(s, 
"-\n");
3a3430affce5de Jeff Layton  2019-11-20  174  
3a3430affce5de Jeff Layton  2019-11-20  175 
spin_lock(>caps_list_lock);
3a3430affce5de Jeff Layton  2019-11-20  176 list_for_each_entry(cw, 
>cap_wait_list, list) {
3a3430affce5de Jeff Layton  2019-11-20  177 seq_printf(s, 
"%-13d0x%-17lx%-17s%-17s\n", cw->tgid, cw->ino,
3a3430affce5de Jeff Layton  2019-11-20  178 
ceph_cap_string(cw->need),
3a3430affce5de Jeff Layton  2019-11-20  179 
ceph_cap_string(cw->want));
3a3430affce5de Jeff Layton  2019-11-20  180 }
3a3430affce5de Jeff Layton  2019-11-20  181 
spin_unlock(>caps_list_lock);
3a3430affce5de Jeff Layton  2019-11-20  182  
76aa844d5b2fb8 Sage Weil2009-10-06  183 return 0;
76aa844d5b2fb8 Sage Weil2009-10-06  184  }

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an 

[kbuild] Re: [PATCH] vdpa: bypass waking up vhost_woker for vdpa vq kick

2020-06-02 Thread Dan Carpenter
Hi Zhu,

url:
https://github.com/0day-ci/linux/commits/Zhu-Lingshan/vdpa-bypass-waking-up-vhost_woker-for-vdpa-vq-kick/20200526-133819
base:   https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: x86_64-randconfig-m001-20200529 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/vhost/vdpa.c:348 vhost_vdpa_set_vring_kick() error: uninitialized 
symbol 'r'.

# 
https://github.com/0day-ci/linux/commit/a84ddbf1ef29f18aafb2bb8a93bcedd4a29a967d
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout a84ddbf1ef29f18aafb2bb8a93bcedd4a29a967d
vim +/r +348 drivers/vhost/vdpa.c

a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  316  static long 
vhost_vdpa_set_vring_kick(struct vhost_virtqueue *vq,
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  317   
void __user *argp)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  318  {
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  319 bool pollstart = false, 
pollstop = false;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  320 struct file *eventfp, *filep = 
NULL;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  321 struct vhost_vring_file f;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  322 long r;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  323  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  324 if (copy_from_user(, argp, 
sizeof(f)))
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  325 return -EFAULT;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  326  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  327 eventfp = f.fd == -1 ? NULL : 
eventfd_fget(f.fd);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  328 if (IS_ERR(eventfp)) {
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  329 r = PTR_ERR(eventfp);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  330 return r;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  331 }
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  332  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  333 if (eventfp != vq->kick) {
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  334 pollstop = (filep = 
vq->kick) != NULL;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  335 pollstart = (vq->kick = 
eventfp) != NULL;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  336 } else
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  337 filep = eventfp;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  338  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  339 if (pollstop && vq->handle_kick)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  340 
vhost_vdpa_poll_stop(vq);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  341  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  342 if (filep)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  343 fput(filep);
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  344  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  345 if (pollstart && 
vq->handle_kick)
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  346 r = 
vhost_vdpa_poll_start(vq);

"r" not initialized on else path.

a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  347  
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26 @348 return r;
a84ddbf1ef29f1 Zhu Lingshan 2020-05-26  349  }

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] Re: [PATCH v3 4/7] watchdog: dw_wdt: Support devices with non-fixed TOP values

2020-06-02 Thread Dan Carpenter
Hi Serge,

url:
https://github.com/0day-ci/linux/commits/Serge-Semin/watchdog-dw_wdt-Take-Baikal-T1-DW-WDT-peculiarities-into-account/20200526-234657
base:   https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: i386-randconfig-m021-20200528 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Dan Carpenter 

smatch warnings:
drivers/watchdog/dw_wdt.c:124 dw_wdt_get_min_timeout() error: buffer overflow 
'dw_wdt->timeouts' 16 <= 16 (assuming for loop doesn't break)
drivers/watchdog/dw_wdt.c:147 dw_wdt_get_timeout() error: buffer overflow 
'dw_wdt->timeouts' 16 <= 16 (assuming for loop doesn't break)

# 
https://github.com/0day-ci/linux/commit/2d6c220c0b6cbc1fd04065b904a6a2f0bfe086e7
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 2d6c220c0b6cbc1fd04065b904a6a2f0bfe086e7
vim +124 drivers/watchdog/dw_wdt.c

2d6c220c0b6cbc Serge Semin 2020-05-26  111  static unsigned int 
dw_wdt_get_min_timeout(struct dw_wdt *dw_wdt)
c9353ae1c69ba1 Jamie Iles  2011-01-24  112  {
2d6c220c0b6cbc Serge Semin 2020-05-26  113  int idx;
2d6c220c0b6cbc Serge Semin 2020-05-26  114  
2d6c220c0b6cbc Serge Semin 2020-05-26  115  /*
2d6c220c0b6cbc Serge Semin 2020-05-26  116   * We'll find a timeout greater 
or equal to one second anyway because
2d6c220c0b6cbc Serge Semin 2020-05-26  117   * the driver probe would have 
failed if there was none.
2d6c220c0b6cbc Serge Semin 2020-05-26  118   */
2d6c220c0b6cbc Serge Semin 2020-05-26  119  for (idx = 0; idx < 
DW_WDT_NUM_TOPS; ++idx) {
2d6c220c0b6cbc Serge Semin 2020-05-26  120  if 
(dw_wdt->timeouts[idx].sec)
2d6c220c0b6cbc Serge Semin 2020-05-26  121  break;
2d6c220c0b6cbc Serge Semin 2020-05-26  122  }
c9353ae1c69ba1 Jamie Iles  2011-01-24  123  
2d6c220c0b6cbc Serge Semin 2020-05-26 @124  return 
dw_wdt->timeouts[idx].sec;
   ^
Read overflow if we don't break out of the loop.

2d6c220c0b6cbc Serge Semin 2020-05-26  125  }
2d6c220c0b6cbc Serge Semin 2020-05-26  126  
2d6c220c0b6cbc Serge Semin 2020-05-26  127  static unsigned int 
dw_wdt_get_max_timeout_ms(struct dw_wdt *dw_wdt)
2d6c220c0b6cbc Serge Semin 2020-05-26  128  {
2d6c220c0b6cbc Serge Semin 2020-05-26  129  struct dw_wdt_timeout *timeout 
= _wdt->timeouts[DW_WDT_NUM_TOPS - 1];
2d6c220c0b6cbc Serge Semin 2020-05-26  130  u64 msec;
2d6c220c0b6cbc Serge Semin 2020-05-26  131  
2d6c220c0b6cbc Serge Semin 2020-05-26  132  msec = (u64)timeout->sec * 
MSEC_PER_SEC + timeout->msec;
2d6c220c0b6cbc Serge Semin 2020-05-26  133  
2d6c220c0b6cbc Serge Semin 2020-05-26  134  return msec < UINT_MAX ? msec : 
UINT_MAX;
2d6c220c0b6cbc Serge Semin 2020-05-26  135  }
2d6c220c0b6cbc Serge Semin 2020-05-26  136  
2d6c220c0b6cbc Serge Semin 2020-05-26  137  static unsigned int 
dw_wdt_get_timeout(struct dw_wdt *dw_wdt)
2d6c220c0b6cbc Serge Semin 2020-05-26  138  {
2d6c220c0b6cbc Serge Semin 2020-05-26  139  int top_val = 
readl(dw_wdt->regs + WDOG_TIMEOUT_RANGE_REG_OFFSET) & 0xF;
2d6c220c0b6cbc Serge Semin 2020-05-26  140  int idx;
2d6c220c0b6cbc Serge Semin 2020-05-26  141  
2d6c220c0b6cbc Serge Semin 2020-05-26  142  for (idx = 0; idx < 
DW_WDT_NUM_TOPS; ++idx) {
2d6c220c0b6cbc Serge Semin 2020-05-26  143  if 
(dw_wdt->timeouts[idx].top_val == top_val)
2d6c220c0b6cbc Serge Semin 2020-05-26  144  break;
2d6c220c0b6cbc Serge Semin 2020-05-26  145  }
2d6c220c0b6cbc Serge Semin 2020-05-26  146  
2d6c220c0b6cbc Serge Semin 2020-05-26 @147  return 
dw_wdt->timeouts[idx].sec;
   ^

c9353ae1c69ba1 Jamie Iles  2011-01-24  148  }

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] [dhowells-fs:fscache-iter 22/62] include/linux/fscache.h:80:30: sparse: sparse: don't know how to apply mode to unsigned int enum fscache_cookie_stage

2020-06-02 Thread kbuild test robot
CC: kbuild-...@lists.01.org
TO: "David, Howells," 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git 
fscache-iter
head:   b4a9eadc021941103fd0c925e7e7b38516ffaf39
commit: 5db57596b0d3e5e78f7202dd50a58cc154f66b7c [22/62] fscache: Replace the 
object management state machine
:: branch date: 6 days ago
:: commit date: 6 days ago
config: x86_64-randconfig-s022-20200602 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-243-gc100a7ab-dirty
git checkout 5db57596b0d3e5e78f7202dd50a58cc154f66b7c
# save the attached .config to linux build tree
make W=1 C=1 ARCH=x86_64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 


sparse warnings: (new ones prefixed by >>)

>> include/linux/fscache.h:80:30: sparse: sparse: don't know how to apply mode 
>> to unsigned int enum fscache_cookie_stage

# 
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/commit/?id=5db57596b0d3e5e78f7202dd50a58cc154f66b7c
git remote add dhowells-fs 
https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git
git remote update dhowells-fs
git checkout 5db57596b0d3e5e78f7202dd50a58cc154f66b7c
vim +80 include/linux/fscache.h

2d6fff63703739 David Howells 2009-04-03  68  
5db57596b0d3e5 David Howells 2020-02-06  69  /*
5db57596b0d3e5 David Howells 2020-02-06  70   * Data object state.
5db57596b0d3e5 David Howells 2020-02-06  71   */
5db57596b0d3e5 David Howells 2020-02-06  72  enum fscache_cookie_stage {
5db57596b0d3e5 David Howells 2020-02-06  73 FSCACHE_COOKIE_STAGE_QUIESCENT, 
/* The cookie is uncached */
5db57596b0d3e5 David Howells 2020-02-06  74 
FSCACHE_COOKIE_STAGE_INITIALISING,  /* The in-memory structs are being 
inited */
5db57596b0d3e5 David Howells 2020-02-06  75 
FSCACHE_COOKIE_STAGE_LOOKING_UP,/* The cache object is being looked up 
*/
5db57596b0d3e5 David Howells 2020-02-06  76 
FSCACHE_COOKIE_STAGE_NO_DATA_YET,   /* The cache has no data, read to 
network */
5db57596b0d3e5 David Howells 2020-02-06  77 FSCACHE_COOKIE_STAGE_ACTIVE,
/* The cache is active, readable and writable */
5db57596b0d3e5 David Howells 2020-02-06  78 
FSCACHE_COOKIE_STAGE_INVALIDATING,  /* The cache is being invalidated */
5db57596b0d3e5 David Howells 2020-02-06  79 FSCACHE_COOKIE_STAGE_DEAD,  
/* The cache object is dead */
5db57596b0d3e5 David Howells 2020-02-06 @80  } __attribute__((mode(byte)));
5db57596b0d3e5 David Howells 2020-02-06  81  

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] [lkundrak-linux-mmp:lr/ariel 65/67] sound/soc/codecs/88ce156-codec.c:1274:1-6: WARNING: invalid free of devm_ allocated data

2020-06-02 Thread kbuild test robot
CC: kbuild-...@lists.01.org
TO: "Lubomir, Rintel," 

tree:   git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git 
lr/ariel
head:   744209eb6a53c65c03de1214febd58adbad72853
commit: 2e9965325fb254f4792fb2b6b086b12dc63f891c [65/67] p4
:: branch date: 11 hours ago
:: commit date: 11 hours ago
config: sparc-randconfig-c024-20200602 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Julia Lawall 


coccinelle warnings: (new ones prefixed by >>)

>> sound/soc/codecs/88ce156-codec.c:1274:1-6: WARNING: invalid free of devm_ 
>> allocated data

# 
https://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git/commit/?id=2e9965325fb254f4792fb2b6b086b12dc63f891c
git remote add lkundrak-linux-mmp 
git://git.kernel.org/pub/scm/linux/kernel/git/lkundrak/linux-mmp.git
git remote update lkundrak-linux-mmp
git checkout 2e9965325fb254f4792fb2b6b086b12dc63f891c
vim +1274 sound/soc/codecs/88ce156-codec.c

27998497039d25 Lubomir Rintel 2020-05-24  1245  
2e9965325fb254 Lubomir Rintel 2020-05-24  1246  static int 
ce156_i2c_probe(struct i2c_client *i2c)
27998497039d25 Lubomir Rintel 2020-05-24  1247  {
27998497039d25 Lubomir Rintel 2020-05-24  1248  struct ce156_private 
*ce156_priv;
27998497039d25 Lubomir Rintel 2020-05-24  1249  int ret;
27998497039d25 Lubomir Rintel 2020-05-24  1250  
27998497039d25 Lubomir Rintel 2020-05-24  1251  printk(KERN_INFO 
"CE156: register i2c driver successfully\n");
27998497039d25 Lubomir Rintel 2020-05-24  1252  
2e9965325fb254 Lubomir Rintel 2020-05-24  1253  ce156_priv = 
devm_kzalloc(>dev, sizeof(struct ce156_private), GFP_KERNEL);
27998497039d25 Lubomir Rintel 2020-05-24  1254  if (ce156_priv == NULL)
27998497039d25 Lubomir Rintel 2020-05-24  1255  return -ENOMEM;
27998497039d25 Lubomir Rintel 2020-05-24  1256  
3c683b56c7a576 Lubomir Rintel 2020-05-24  1257  ce156_priv->regmap = 
devm_regmap_init_i2c(i2c, _regmap);
3c683b56c7a576 Lubomir Rintel 2020-05-24  1258  if 
(IS_ERR(ce156_priv->regmap)) {
3c683b56c7a576 Lubomir Rintel 2020-05-24  1259  ret = 
PTR_ERR(ce156_priv->regmap);
3c683b56c7a576 Lubomir Rintel 2020-05-24  1260  
dev_err(>dev, "Failed to allocate regmap (%d)\n", ret);
3c683b56c7a576 Lubomir Rintel 2020-05-24  1261  return ret;
3c683b56c7a576 Lubomir Rintel 2020-05-24  1262  }
3c683b56c7a576 Lubomir Rintel 2020-05-24  1263  
40169b41e2e888 Lubomir Rintel 2020-05-24  1264  ret = 
devm_snd_soc_register_component(>dev, _component_dev_ce156, 
_dai, 1);
27998497039d25 Lubomir Rintel 2020-05-24  1265  
27998497039d25 Lubomir Rintel 2020-05-24  1266  if (ret) {
27998497039d25 Lubomir Rintel 2020-05-24  1267  
printk(KERN_INFO "CE156: Failed to register codec\n");
27998497039d25 Lubomir Rintel 2020-05-24  1268  goto out;
27998497039d25 Lubomir Rintel 2020-05-24  1269  }
27998497039d25 Lubomir Rintel 2020-05-24  1270  
27998497039d25 Lubomir Rintel 2020-05-24  1271  return ret;
27998497039d25 Lubomir Rintel 2020-05-24  1272  
27998497039d25 Lubomir Rintel 2020-05-24  1273  out:
27998497039d25 Lubomir Rintel 2020-05-24 @1274  kfree(ce156_priv);
27998497039d25 Lubomir Rintel 2020-05-24  1275  return -EINVAL;
27998497039d25 Lubomir Rintel 2020-05-24  1276  }
27998497039d25 Lubomir Rintel 2020-05-24  1277  

:: The code at line 1274 was first introduced by commit
:: 27998497039d2518d34ba88ddd721c2290a2e162 XXX 88CE156

:: TO: Lubomir Rintel 
:: CC: Lubomir Rintel 

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org


[kbuild] drivers/usb/gadget/legacy/raw_gadget.c:102 raw_event_queue_fetch() warn: inconsistent returns 'queue->sema'.

2020-06-02 Thread kbuild test robot
CC: kbuild-...@lists.01.org
CC: linux-ker...@vger.kernel.org
TO: "Andrey, Konovalov," 
CC: Felipe Balbi 
CC: "Greg Kroah-Hartman" 

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 
master
head:   f359287765c04711ff54fbd11645271d8e5ff763
commit: f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10 usb: gadget: add raw-gadget 
interface
date:   3 months ago
:: branch date: 6 hours ago
:: commit date: 3 months ago
config: x86_64-randconfig-m001-20200602 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot 
Reported-by: Dan Carpenter 

New smatch warnings:
drivers/usb/gadget/legacy/raw_gadget.c:102 raw_event_queue_fetch() warn: 
inconsistent returns 'queue->sema'.

Old smatch warnings:
drivers/usb/gadget/legacy/raw_gadget.c:397 raw_ioctl_init() warn: maybe return 
-EFAULT instead of the bytes remaining?
drivers/usb/gadget/legacy/raw_gadget.c:512 raw_ioctl_event_fetch() warn: maybe 
return -EFAULT instead of the bytes remaining?
drivers/usb/gadget/legacy/raw_gadget.c:535 raw_ioctl_event_fetch() warn: maybe 
return -EFAULT instead of the bytes remaining?
drivers/usb/gadget/legacy/raw_gadget.c:546 raw_alloc_io_data() error: passing 
non negative 8 to ERR_PTR
drivers/usb/gadget/legacy/raw_gadget.c:668 raw_ioctl_ep0_read() warn: maybe 
return -EFAULT instead of the bytes remaining?
drivers/usb/gadget/legacy/raw_gadget.c:962 raw_ioctl_ep_read() warn: maybe 
return -EFAULT instead of the bytes remaining?

# 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10
git remote add linus 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout f2c2e717642c66f7fe7e5dd69b2e8ff5849f4d10
vim +102 drivers/usb/gadget/legacy/raw_gadget.c

f2c2e717642c66 Andrey Konovalov 2020-02-24   80  
f2c2e717642c66 Andrey Konovalov 2020-02-24   81  static struct usb_raw_event 
*raw_event_queue_fetch(
f2c2e717642c66 Andrey Konovalov 2020-02-24   82 
struct raw_event_queue *queue)
f2c2e717642c66 Andrey Konovalov 2020-02-24   83  {
f2c2e717642c66 Andrey Konovalov 2020-02-24   84 unsigned long flags;
f2c2e717642c66 Andrey Konovalov 2020-02-24   85 struct usb_raw_event 
*event;
f2c2e717642c66 Andrey Konovalov 2020-02-24   86  
f2c2e717642c66 Andrey Konovalov 2020-02-24   87 /*
f2c2e717642c66 Andrey Konovalov 2020-02-24   88  * This function can be 
called concurrently. We first check that
f2c2e717642c66 Andrey Konovalov 2020-02-24   89  * there's at least one 
event queued by decrementing the semaphore,
f2c2e717642c66 Andrey Konovalov 2020-02-24   90  * and then take the 
lock to protect queue struct fields.
f2c2e717642c66 Andrey Konovalov 2020-02-24   91  */
f2c2e717642c66 Andrey Konovalov 2020-02-24   92 if 
(down_interruptible(>sema))
f2c2e717642c66 Andrey Konovalov 2020-02-24   93 return NULL;
f2c2e717642c66 Andrey Konovalov 2020-02-24   94 
spin_lock_irqsave(>lock, flags);
f2c2e717642c66 Andrey Konovalov 2020-02-24   95 if 
(WARN_ON(!queue->size))
f2c2e717642c66 Andrey Konovalov 2020-02-24   96 return NULL;
f2c2e717642c66 Andrey Konovalov 2020-02-24   97 event = 
queue->events[0];
f2c2e717642c66 Andrey Konovalov 2020-02-24   98 queue->size--;
f2c2e717642c66 Andrey Konovalov 2020-02-24   99 
memmove(>events[0], >events[1],
f2c2e717642c66 Andrey Konovalov 2020-02-24  100 
queue->size * sizeof(queue->events[0]));
f2c2e717642c66 Andrey Konovalov 2020-02-24  101 
spin_unlock_irqrestore(>lock, flags);
f2c2e717642c66 Andrey Konovalov 2020-02-24 @102 return event;
f2c2e717642c66 Andrey Konovalov 2020-02-24  103  }
f2c2e717642c66 Andrey Konovalov 2020-02-24  104  

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


.config.gz
Description: application/gzip
___
kbuild mailing list -- kbuild@lists.01.org
To unsubscribe send an email to kbuild-le...@lists.01.org