[kbuild] [plbossart-sound:fix/0day 498/500] sound/soc/sof/intel/hda.c:579 hda_dsp_remove() error: we previously assumed 'hda' could be null (see line 559)
tree: https://github.com/plbossart/sound fix/0day head: 8a685416f2ac9d9be517bd63b8e41275c69e2299 commit: f395dd273254cd66d28ae0b24e54ec0871d435ff [498/500] ASoC: SOF: remove intel-specific field from snd_sof_dev{} smatch warnings: sound/soc/sof/intel/hda.c:579 hda_dsp_remove() error: we previously assumed 'hda' could be null (see line 559) sound/soc/sof/intel/hda-trace.c:49 hda_dsp_trace_init() warn: variable dereferenced before check 'hda' (see line 46) sound/soc/sof/intel/hda-trace.c:55 hda_dsp_trace_init() error: we previously assumed 'hda->dtrace_stream' could be null (see line 49) # https://github.com/plbossart/sound/commit/f395dd273254cd66d28ae0b24e54ec0871d435ff git remote add plbossart-sound https://github.com/plbossart/sound git remote update plbossart-sound git checkout f395dd273254cd66d28ae0b24e54ec0871d435ff vim +/hda +579 sound/soc/sof/intel/hda.c fa06c6de Bard liao2018-11-23 558 f395dd27 Bard liao2018-12-19 @559 if (hda && (!IS_ERR_OR_NULL(hda->dmic_dev))) ^^^ Is this check required? f395dd27 Bard liao2018-12-19 560 platform_device_unregister(hda->dmic_dev); 5d7f0748 Pierre-Louis Bossart 2018-10-31 561 def495eb Liam Girdwood2018-01-08 562 /* disable DSP IRQ */ def495eb Liam Girdwood2018-01-08 563 snd_sof_dsp_update_bits(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPCTL, def495eb Liam Girdwood2018-01-08 564 SOF_HDA_PPCTL_PIE, 0); def495eb Liam Girdwood2018-01-08 565 def495eb Liam Girdwood2018-01-08 566 /* disable CIE and GIE interrupts */ def495eb Liam Girdwood2018-01-08 567 snd_sof_dsp_update_bits(sdev, HDA_DSP_HDA_BAR, SOF_HDA_INTCTL, def495eb Liam Girdwood2018-01-08 568 SOF_HDA_INT_CTRL_EN | SOF_HDA_INT_GLOBAL_EN, 0); def495eb Liam Girdwood2018-01-08 569 def495eb Liam Girdwood2018-01-08 570 /* disable cores */ def495eb Liam Girdwood2018-01-08 571 if (chip) def495eb Liam Girdwood2018-01-08 572 hda_dsp_core_reset_power_down(sdev, chip->cores_mask); def495eb Liam Girdwood2018-01-08 573 def495eb Liam Girdwood2018-01-08 574 /* disable DSP */ def495eb Liam Girdwood2018-01-08 575 snd_sof_dsp_update_bits(sdev, HDA_DSP_PP_BAR, SOF_HDA_REG_PP_PPCTL, def495eb Liam Girdwood2018-01-08 576 SOF_HDA_PPCTL_GPROCEN, 0); def495eb Liam Girdwood2018-01-08 577 def495eb Liam Girdwood2018-01-08 578 free_irq(sdev->ipc_irq, sdev); f395dd27 Bard liao2018-12-19 @579 free_irq(hda->irq, bus); Not checked here. 7032cf60 Libin Yang 2018-11-28 580 if (sdev->msi_enabled) def495eb Liam Girdwood2018-01-08 581 pci_free_irq_vectors(pci); def495eb Liam Girdwood2018-01-08 582 def495eb Liam Girdwood2018-01-08 583 hda_dsp_stream_free(sdev); fa06c6de Bard liao2018-11-23 584 #if IS_ENABLED(CONFIG_SND_SOC_SOF_HDA) fa06c6de Bard liao2018-11-23 585 snd_hdac_link_free_all(bus); fa06c6de Bard liao2018-11-23 586 #endif 893e7e85 Pierre-Louis Bossart 2018-11-12 587 893e7e85 Pierre-Louis Bossart 2018-11-12 588 iounmap(sdev->bar[HDA_DSP_BAR]); 893e7e85 Pierre-Louis Bossart 2018-11-12 589 iounmap(bus->remap_addr); 893e7e85 Pierre-Louis Bossart 2018-11-12 590 --- 0-DAY kernel test infrastructureOpen Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
Re: [kbuild] [zx2c4:jd/with-cryptoapi-port 21/22] drivers/net/wireguard/selftest/allowedips.c:674 wg_allowedips_selftest() warn: Function too hairy. No more merges.
On Sun, Dec 30, 2018 at 05:52:01PM +0800, kbuild test robot wrote: > CC: kbuild-...@01.org > TO: "Jason A. Donenfeld" > > tree: https://git.kernel.org/pub/scm/linux/kernel/git/zx2c4/linux.git > jd/with-cryptoapi-port > head: 3116e786948cae99bd0704b568bb682f71ba9262 > commit: 27bafa2b96e107a21b396173dd7afbcd8d635db8 [21/22] net: WireGuard > secure network tunnel > :: branch date: 2 days ago > :: commit date: 2 days ago > > New smatch warnings: > drivers/net/wireguard/selftest/allowedips.c:674 wg_allowedips_selftest() > warn: Function too hairy. No more merges. > drivers/net/wireguard/selftest/allowedips.c:674 wg_allowedips_selftest() > parse error: Function too hairy. Giving up. 44 seconds > This aren't really warnings. I'm sorry. The format changed so that's why they are showing up now. regards, dan carpenter ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
Re: [kbuild] [PATCH] hwmon: lm80: fix a missing check of return value
Hi Kangjie, Thank you for the patch! Perhaps something to improve: url: https://github.com/0day-ci/linux/commits/Kangjie-Lu/hwmon-lm80-fix-a-missing-check-of-return-value/20181222-023000 base: https://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging.git hwmon-next smatch warnings: drivers/hwmon/lm80.c:408 set_fan_div() warn: inconsistent returns 'mutex:>update_lock'. Locked on: line 397 Unlocked on: line 367 # https://github.com/0day-ci/linux/commit/7612ba0bef1defb6de3290accca07633ccfd3365 git remote add linux-review https://github.com/0day-ci/linux git remote update linux-review git checkout 7612ba0bef1defb6de3290accca07633ccfd3365 vim +408 drivers/hwmon/lm80.c ^1da177e4 drivers/i2c/chips/lm80.c Linus Torvalds 2005-04-16 348 1160631b1 drivers/hwmon/lm80.c Guenter Roeck 2012-01-19 349 /* 1160631b1 drivers/hwmon/lm80.c Guenter Roeck 2012-01-19 350 * Note: we save and restore the fan minimum here, because its value is 1160631b1 drivers/hwmon/lm80.c Guenter Roeck 2012-01-19 351 * determined in part by the fan divisor. This follows the principle of 1160631b1 drivers/hwmon/lm80.c Guenter Roeck 2012-01-19 352 * least surprise; the user doesn't expect the fan minimum to change just 1160631b1 drivers/hwmon/lm80.c Guenter Roeck 2012-01-19 353 * because the divisor changed. 1160631b1 drivers/hwmon/lm80.c Guenter Roeck 2012-01-19 354 */ f8181762a drivers/hwmon/lm80.c Jean Delvare 2008-01-05 355 static ssize_t set_fan_div(struct device *dev, struct device_attribute *attr, f8181762a drivers/hwmon/lm80.c Jean Delvare 2008-01-05 356 const char *buf, size_t count) ^1da177e4 drivers/i2c/chips/lm80.c Linus Torvalds 2005-04-16 357 { f8181762a drivers/hwmon/lm80.c Jean Delvare 2008-01-05 358 int nr = to_sensor_dev_attr(attr)->index; 118c9a61f drivers/hwmon/lm80.c Guenter Roeck 2014-04-04 359 struct lm80_data *data = dev_get_drvdata(dev); 118c9a61f drivers/hwmon/lm80.c Guenter Roeck 2014-04-04 360 struct i2c_client *client = data->client; 6a9e7c4c0 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-10 361 unsigned long min, val; ^1da177e4 drivers/i2c/chips/lm80.c Linus Torvalds 2005-04-16 362 u8 reg; 7612ba0be drivers/hwmon/lm80.c Kangjie Lu 2018-12-21 363 int ret; 7612ba0be drivers/hwmon/lm80.c Kangjie Lu 2018-12-21 364 7612ba0be drivers/hwmon/lm80.c Kangjie Lu 2018-12-21 365 ret = kstrtoul(buf, 10, ); 7612ba0be drivers/hwmon/lm80.c Kangjie Lu 2018-12-21 366 if (ret < 0) 7612ba0be drivers/hwmon/lm80.c Kangjie Lu 2018-12-21 367 return ret; ^1da177e4 drivers/i2c/chips/lm80.c Linus Torvalds 2005-04-16 368 ^1da177e4 drivers/i2c/chips/lm80.c Linus Torvalds 2005-04-16 369 /* Save fan_min */ 9a61bf630 drivers/hwmon/lm80.c Ingo Molnar2006-01-18 370 mutex_lock(>update_lock); 85b3ee07b drivers/hwmon/lm80.c Guenter Roeck 2014-04-13 371 min = FAN_FROM_REG(data->fan[f_min][nr], ^1da177e4 drivers/i2c/chips/lm80.c Linus Torvalds 2005-04-16 372 DIV_FROM_REG(data->fan_div[nr])); ^1da177e4 drivers/i2c/chips/lm80.c Linus Torvalds 2005-04-16 373 ^1da177e4 drivers/i2c/chips/lm80.c Linus Torvalds 2005-04-16 374 switch (val) { 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 375 case 1: 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 376 data->fan_div[nr] = 0; 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 377 break; 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 378 case 2: 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 379 data->fan_div[nr] = 1; 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 380 break; 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 381 case 4: 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 382 data->fan_div[nr] = 2; 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 383 break; 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 384 case 8: 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 385 data->fan_div[nr] = 3; 66b3b1f75 drivers/hwmon/lm80.c Frans Meulenbroeks 2012-01-04 386 break; ^1da177e4 drivers/i2c/chips/lm80.c Linus Torvalds 2005-04-16 387 default: 118c9a61f drivers/hwmon/lm80.c Guenter Roeck 2014-04-04 388 dev_err(dev, b55f37572 drivers/hwmon/lm80.c Guenter Roeck 2013-01-10 389 "fan_div value %ld not supported. Choose one of 1, 2, 4 or 8!\n", b55f37572 drivers/hwmon/lm80.c Guenter Roeck 2013-01-10 390 val); 9a61bf630 drivers/hwmon/lm80.c Ingo Molnar2006-01-18 391
[kbuild] [martinbrandenburg:pagecache-revert 17/18] fs/orangefs/inode.c:148 orangefs_write_begin() warn: possible memory leak of 'wr'
tree: https://github.com/martinbrandenburg/linux pagecache-revert head: b92a2f97a9eb0f1f3998178afaac58b5277533ec commit: f1d070e01461ea58999b8ac93156b0d1bf5d69a9 [17/18] orangefs: write range tracking New smatch warnings: fs/orangefs/inode.c:148 orangefs_write_begin() warn: possible memory leak of 'wr' Old smatch warnings: fs/orangefs/inode.c:161 orangefs_write_begin() warn: possible memory leak of 'wr' fs/orangefs/inode.c:179 orangefs_write_begin() warn: possible memory leak of 'wr' # https://github.com/martinbrandenburg/linux/commit/f1d070e01461ea58999b8ac93156b0d1bf5d69a9 git remote add martinbrandenburg https://github.com/martinbrandenburg/linux git remote update martinbrandenburg git checkout f1d070e01461ea58999b8ac93156b0d1bf5d69a9 vim +/wr +148 fs/orangefs/inode.c f1d070e0 Martin Brandenburg 2018-12-14 116 f1d070e0 Martin Brandenburg 2018-12-14 117 int orangefs_write_begin(struct file *file, struct address_space *mapping, f1d070e0 Martin Brandenburg 2018-12-14 118 loff_t pos, unsigned len, unsigned flags, struct page **pagep, f1d070e0 Martin Brandenburg 2018-12-14 119 void **fsdata) f1d070e0 Martin Brandenburg 2018-12-14 120 { f1d070e0 Martin Brandenburg 2018-12-14 121 struct orangefs_write_range *wr; f1d070e0 Martin Brandenburg 2018-12-14 122 struct page *page; f1d070e0 Martin Brandenburg 2018-12-14 123 pgoff_t index; f1d070e0 Martin Brandenburg 2018-12-14 124 int ret; f1d070e0 Martin Brandenburg 2018-12-14 125 f1d070e0 Martin Brandenburg 2018-12-14 126 wr = kmalloc(sizeof *wr, GFP_KERNEL); f1d070e0 Martin Brandenburg 2018-12-14 127 if (!wr) f1d070e0 Martin Brandenburg 2018-12-14 128 return -ENOMEM; f1d070e0 Martin Brandenburg 2018-12-14 129 f1d070e0 Martin Brandenburg 2018-12-14 130 index = pos >> PAGE_SHIFT; f1d070e0 Martin Brandenburg 2018-12-14 131 f1d070e0 Martin Brandenburg 2018-12-14 132 page = grab_cache_page_write_begin(mapping, index, flags); f1d070e0 Martin Brandenburg 2018-12-14 133 if (!page) { f1d070e0 Martin Brandenburg 2018-12-14 134 kfree(wr); f1d070e0 Martin Brandenburg 2018-12-14 135 return -ENOMEM; f1d070e0 Martin Brandenburg 2018-12-14 136 } f1d070e0 Martin Brandenburg 2018-12-14 137 f1d070e0 Martin Brandenburg 2018-12-14 138 *pagep = page; f1d070e0 Martin Brandenburg 2018-12-14 139 f1d070e0 Martin Brandenburg 2018-12-14 140 if (PageDirty(page) && !PagePrivate(page)) { f1d070e0 Martin Brandenburg 2018-12-14 141 /* f1d070e0 Martin Brandenburg 2018-12-14 142 * Should be impossible. If it happens, launder the page f1d070e0 Martin Brandenburg 2018-12-14 143 * since we don't know what's dirty. This will WARN in f1d070e0 Martin Brandenburg 2018-12-14 144 * orangefs_writepage_locked. f1d070e0 Martin Brandenburg 2018-12-14 145 */ f1d070e0 Martin Brandenburg 2018-12-14 146 ret = orangefs_launder_page(page); f1d070e0 Martin Brandenburg 2018-12-14 147 if (ret) f1d070e0 Martin Brandenburg 2018-12-14 @148 return ret; f1d070e0 Martin Brandenburg 2018-12-14 149 } f1d070e0 Martin Brandenburg 2018-12-14 150 if (PagePrivate(page)) { f1d070e0 Martin Brandenburg 2018-12-14 151 struct orangefs_write_range *wr; f1d070e0 Martin Brandenburg 2018-12-14 152 wr = (struct orangefs_write_range *)page_private(page); f1d070e0 Martin Brandenburg 2018-12-14 153 if (wr->pos + wr->len == pos && f1d070e0 Martin Brandenburg 2018-12-14 154 uid_eq(wr->uid, current_fsuid()) && f1d070e0 Martin Brandenburg 2018-12-14 155 gid_eq(wr->gid, current_fsgid())) { f1d070e0 Martin Brandenburg 2018-12-14 156 wr->len += len; f1d070e0 Martin Brandenburg 2018-12-14 157 goto okay; f1d070e0 Martin Brandenburg 2018-12-14 158 } else { f1d070e0 Martin Brandenburg 2018-12-14 159 ret = orangefs_launder_page(page); f1d070e0 Martin Brandenburg 2018-12-14 160 if (ret) f1d070e0 Martin Brandenburg 2018-12-14 161 return ret; f1d070e0 Martin Brandenburg 2018-12-14 162 } f1d070e0 Martin Brandenburg 2018-12-14 163 f1d070e0 Martin Brandenburg 2018-12-14 164 } f1d070e0 Martin Brandenburg 2018-12-14 165 wr->pos = pos; f1d070e0 Martin Brandenburg 2018-12-14 166 wr->len = len; f1d070e0 Martin Brandenburg 2018-12-14 167 wr->uid = current_fsuid(); f1d070e0 Martin Brandenburg 2018-12-14 168 wr->gid = current_fsgid(); f1d070e0 Martin Brandenburg 2018-12-14 169 SetPagePrivate(page); f1d070e0 Martin Brandenburg 2018-12-14 170 set_page_private(page, (unsigned long)wr); f1d070e0 Martin Brandenburg 2018-12-14 171 get_page(page); f1d070e0 Martin Brandenburg 2018-12-14 172 okay: f1d070e0 Martin Brandenburg