The crypto_alloc_comp() function never returns NULL, it returns error
pointers on error.
Signed-off-by: Dan Carpenter
---
fs/pstore/platform.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/pstore/platform.c b/fs/pstore/platform.c
index 36714df37d5d..b7a2a2a31dee 100644
(attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/base/swnode.c:785 software_node_unregister_node_group() error:
uninitialized symbol 'i
The debugfs_create_dir() function never returns NULLs so this code will
never be executed. It's not intended that callers will check for
debugfs errors in the normal case and it's not necessary in this driver,
so we can just delete this code.
Signed-off-by: Dan Carpenter
---
v2: Fix subject
On Mon, Nov 30, 2020 at 11:20:05AM -0300, Helen Koike wrote:
> Hi Dan,
>
> Thank you for your patch.
>
> On 11/30/20 9:53 AM, Dan Carpenter wrote:
> > The debugfs_create_dir() function never returns NULLs. It's not supposed
> > to checked for errors in the norma
t; case 0:
> ++x;
> default:
> ;
> }
Don't warn for this.
If adding a break statement changes the flow of the code then warn about
potentially missing break statements, but if it doesn't change anything
then don't warn about it.
regards,
dan carpenter
ing.
>
> FWIW, this series has found at least one bug so far:
> https://lore.kernel.org/lkml/CAFCwf11izHF=g1mGry1fE5kvFFFrxzhPSM6qKAO8gxSp=kr...@mail.gmail.com/
This is a fallthrough to a return and not to a break. That should
trigger a warning. The fallthrough to a break should not generate a
warning.
The bug we're trying to fix is "missing break statement" but if the
result of the bug is "we hit a break statement" then now we're just
talking about style. GCC should limit itself to warning about
potentially buggy code.
regards,
dan carpenter
g where
the goto comes from.
Fixes: 8f7039787687 ("bus: mhi: core: Move to using high priority workqueue")
Signed-off-by: Dan Carpenter
---
drivers/bus/mhi/core/init.c | 29 ++---
1 file changed, 14 insertions(+), 15 deletions(-)
diff --git a/drivers/bus/mhi/cor
ate to remove the
> "default" case.
There are checkers which complain about that. (As a static checker
developer myself, I think complaining about missing default cases is a
waste of everyone's time).
regards,
dan carpenter
The debugfs_create_dir() function never returns NULLs. It's not supposed
to checked for errors in the normal case and there is no need to check
in this function so let's just delete this dead code.
Signed-off-by: Dan Carpenter
---
drivers/media/platform/rockchip/rkisp1/rkisp1-dev.c | 4
1
t->routes[1] =
> t->routes[2];
> + break;
> case 2:
> break;
> }
regards,
dan carpenter
free_irq(pmic->irq, pmic);
This free should only be done if devm_mfd_add_devices() fails. I don't
know what happens if you free an IRQ which has not been requested. I
think it triggers a WARN().
316
317 return ret;
318 }
regards,
dan carpenter
nmap "grp->regs".
>
> This variable is unmapped in the caller with a wholesale cleanup function
> unmap_group_regs(). Probably a false positive for smatch?
>
Yeah. Thanks. Smatch doesn't consider that the variable might be freed
in the caller.
regards,
dan carpenter
On Mon, Nov 16, 2020 at 10:15:04AM +, Chris Wilson wrote:
> Quoting Dan Carpenter (2020-11-16 10:08:38)
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > master
> > head: 0062442ecfef0d82cd69e3e600d500
as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/gpu/drm/i915/gem/i915_gem_throttle.c:59 i915_gem_throttle_ioctl()
error: double locked 'ctx
(Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/gpu/drm/mcde/mcde_display.c:543 mcde_configure_channel() error:
uninitialized symbol 'val'.
vim +/val +543 drivers/gpu
config: powerpc64-randconfig-m031-20201113 (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/net/ethernet/freescale/gianfar.c:580
)
compiler: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/mmc/host/tmio_mmc.c:177 tmio_mmc_probe() warn: argument 3 to %08lx
specifier is cast from pointer
vim +177
On Fri, Nov 13, 2020 at 09:56:37AM +0100, Vincent Guittot wrote:
> Hi Dan,
>
> Le vendredi 13 nov. 2020 à 11:46:57 (+0300), Dan Carpenter a écrit :
> > Hello Vincent Guittot,
> >
> > The patch b4c9c9f15649: "sched/fair: Prefer prev cpu in asymmetric
> >
Clean up the first driver if the second driver can't be registered.
Fixes: 4ee9fe3e292b ("clk: qcom: lpass-sc7180: Disentangle the two clock
devices")
Signed-off-by: Dan Carpenter
---
drivers/clk/qcom/lpasscorecc-sc7180.c | 8 +++-
1 file changed, 7 insertions(+), 1 deletion(-)
This needs to call of_node_put(np) before returning if of_iomap() fails.
Fixes: e0218dca5787 ("soc: aspeed: Add soc info driver")
Signed-off-by: Dan Carpenter
---
drivers/soc/aspeed/aspeed-socinfo.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/soc/asp
util, prev))
6258 return prev;
6259
6260 /*
6261 * Allow a per-cpu kthread to stack with the wakee if the
regards,
dan carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master
head: 3d5e28bff7ad55aea081c1af516cc1c94a5eca7d
commit: 573ed90aa5e23b512168400ba6d65e592081944e devlink: Force enclosing array
on binary fmsg data
compiler: riscv64-linux-gcc (GCC) 9.3.0
If you fix the issue,
On Wed, Nov 11, 2020 at 09:01:34AM +0100, LABBE Corentin wrote:
> On Tue, Nov 10, 2020 at 01:47:37PM +0300, Dan Carpenter wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
> > master
> > head: 407ab579637ced6dc32cfb2295afb7
ot;if (ret) " will not.
int var;
ret = frob();
if (ret < 0)
return ret;
Smatch thinks positive returns are not handled so it complains that
"var can be uninitialized".
regards,
dan carpenter
, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/media/v4l2-core/v4l2-ctrls.c:1809 std_validate_compound() warn:
ignoring unreachable code.
vim +1809 drivers/media/v4l2-core/v4l2-ctrls.c
de8145452eebe55 Ezequiel Garcia
get to drop a
reference on an error path. Right now I just assume that anything with
"error", "drop" or "->stats->" in the name is just a counter.
regards,
dan carpenter
: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/crypto/allwinner/sun8i-ce/sun8i-ce-hash.c:412 sun8i_ce_hash_run() warn:
possible memory leak of 'result'
vim +/result
r MIPS:
>
> original:- ab81d3305d578c2568fbc73aad2f9e61 kernel/taskstats.o
> After your change:- ab81d3305d578c2568fbc73aad2f9e61 kernel/taskstats.o
> After my change:- 0acae2c8d72abd3e15bf805fccdca711 kernel/taskstats.o
I'm surprised the line numbers from the printks aren't affecting it...
I personally prefer Lukas's patch. "rc" should be function scope...
regards,
dan carpenter
> > Too late.
> >
> > 214 return;
> > 215
> >
> > Fixes: 93f323b9 ("mptcp: add a new sysctl add_addr_timeout")
> > Reported-by: Dan Carpenter
> > Signed-off-by: Geliang Tang
> > Revie
The following commit has been merged into the locking/urgent branch of tip:
Commit-ID: 1e106aa3509b86738769775969822ffc1ec21bf4
Gitweb:
https://git.kernel.org/tip/1e106aa3509b86738769775969822ffc1ec21bf4
Author:Dan Carpenter
AuthorDate:Fri, 06 Nov 2020 11:52:05 +03:00
config: x86_64-randconfig-m001-20201109 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/crypto/marvell/octeontx/otx_cptpf_ucode.c
;
> > is missing a Signed-off-by from its author.
>
> I split the original patch in 2 and fixed a bug in this second patch,
> but unless I hear otherwise I'll assume Dan's OK with his Signed-off-by
> staying on both
Yep. Thanks!
Signed-off-by: Dan Carpenter
regards,
dan carpenter
The kfree() needs to be moved down a line to prevent a use after free.
Fixes: 8c9108d014c5 ("auxdisplay: add a driver for lcd2s character display")
Signed-off-by: Dan Carpenter
---
drivers/auxdisplay/lcd2s.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/
state() vs. exit_pi_state_list()
races")
Signed-off-by: Dan Carpenter
---
This is from static analysis and not tested. I am not very familiar
with futex code.
kernel/futex.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/kernel/futex.c b/kernel/futex.c
index f8
On Thu, Nov 05, 2020 at 04:24:30PM -0600, Bjorn Helgaas wrote:
> On Wed, Oct 07, 2020 at 03:33:45PM +0300, Dan Carpenter wrote:
> > On Wed, Oct 07, 2020 at 12:46:15PM +0100, Colin King wrote:
> > > From: Colin Ian King
> > >
> > > The shift of 1 by a
ever send it and I forget about it completely. I have
currently have 740 messages in my postponed messages folder. :P
That's a lot of whining and complaining which I never sent and the world
is the more beautiful for it.
regards,
dan carpenter
ught
it didn't matter at all...
regards,
dan carpenter
Hi Yu,
url:
https://github.com/0day-ci/linux/commits/Yu-Hao/sound-core-seq-remove-dead-code/20201102-152326
base: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
for-next
compiler: sparc64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master
head: b7cbaf59f62f8ab8f157698f9e31642bff525bd0
commit: bbd7ffdbef6888459f301c5889f3b14ada38b913 clk: Allow the common clk
framework to be selectable
compiler: ia64-linux-gcc (GCC) 9.3.0
If you fix the issue,
as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/net/wireless/ath/ath10k/mac.c:9125 ath10k_mac_op_set_tid_config()
error: uninitialized symbol 'ret'.
vim
as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/gpu/drm/drm_irq.c:175 drm_irq_uninstall() warn: variable dereferenced
before check 'dev' (see line 175
5fc6b075e165f641fbc366b58b578055762d5f8c
config: i386-randconfig-m021-20201101 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
fs/ntfs3/attrib.c:331
Shifting by a negative number is undefined. These values come from the
module parameter, so it's not a big deal from a practical perspective.
Fixes: 9fd91d959f1a ("ide: add "ignore_cable" parameter (take 2)")
Signed-off-by: Dan Carpenter
---
drivers/ide/ide.c | 2 +
as .config)
compiler: hppa64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/net/wireless/intel/iwlwifi/pcie/drv.c:1049 iwl_pci_probe() warn: mask
and shift to zero
vim +1049
tenae with all the software on it and an ethernet cable into your
house. I don't know what software the antennaes are using. Probably
Linux but with an out of tree kernel module is my guess.
regards,
dan carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master
head: 4525c8781ec0701ce824e8bd379ae1b129e26568
commit: d0e63b343e575e8b74c185565b0d79a93494bcaa drm/amdkfd: Use kvmalloc
instead of kmalloc for VCRAT
compiler: powerpc64le-linux-gcc (GCC) 9.3.0
If you fix the
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master
head: 4525c8781ec0701ce824e8bd379ae1b129e26568
commit: c2c25c1cf96927a0b6ddb6aaa063f1fdcc90d749 drm/aspeed: Use managed
drmm_mode_config_cleanup
compiler: nds32le-linux-gcc (GCC) 9.3.0
If you fix the issue,
e is really
> wrong here, be careful.
It's an interesting warning message. Sparse is correct that the code
looks strange. If there were ever two or more elements in the array
then the code would break. But since the code only uses a max of one
element then it's fine.
I guess the question is does this warning ever catch bugs in real life?
It seems like that the kind of bug which would be caught in testing so
static analysis is not going to be useful.
regards,
dan carpenter
as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/tty/serial/owl-uart.c:712 owl_uart_probe() warn: 'owl_port->clk' not
released on lines: 698.
vim
)
compiler: nios2-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/usb/typec/tcpm/tcpci_maxim.c:324 max_tcpci_irq() error: uninitialized
symbol 'irq_return'.
drivers/usb/typec/tcpm
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
master
head: 4525c8781ec0701ce824e8bd379ae1b129e26568
commit: cd457afb16670501f00354eb0e705a7d8a50d79d bus: mhi: core: Add support
for downloading firmware over BHIe
compiler: powerpc64le-linux-gcc (GCC) 9.3.0
If you
)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/phy/qualcomm/phy-qcom-qmp.c:3900 qcom_qmp_phy_probe() error:
uninitialized symbol 'dp_serdes'.
Old smatch
(Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/gpu/drm/exynos/exynos_drm_dma.c:144 exynos_drm_register_dma() error:
uninitialized symbol 'mapping'.
vim +/mapping +144 drivers
)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/reset/reset-socfpga.c:67 a10_reset_init() warn: 'data->membase' not
released on lines: 67.
drivers/reset/re
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/media/i2c/imx300.c:2413 imx300_set_framefmt() error: uninitialized
symbol 'ret'.
vim +/ret +2413 drivers/media/i2c/imx300.c
c82629fb21ade4
if (ret < 0)
> + goto error_notifier_registered;
> +
> + return 0;
> +
> +error_notifier_registered:
> + v4l2_async_notifier_unregister(notifier);
> +error_notifier:
> + v4l2_async_notifier_cleanup(notifier);
> +error_media_entity:
> + media_entity_cleanup(>entity);
> +
> + return ret;
> +}
regards,
dan carpenter
> +
> + ret = v4l2_fwnode_endpoint_parse(handle, endpoint);
> + fwnode_handle_put(handle);
> + if (ret)
> + goto error_media_entity;
> +
> + /* Notifier */
> +
> + v4l2_async_notifier_init(notifier);
> +
> + ret = v4l2_async_notifier_
-randconfig-m021-20201022 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
net/ipv4/inet_hashtables.c:570 inet_ehash_insert_chk_dup() error: uninitialized
On Mon, Oct 26, 2020 at 11:18:16AM +0800, Yunsheng Lin wrote:
> On 2020/10/23 19:22, Dan Carpenter wrote:
> > Smatch complains that "ret" might be uninitialized if we don't enter
> > the loop. We do always enter the loop so it's a false positive, but
> > it's cleane
ize_t n_pages;
> > void *vaddr;
> > + int i;
> >
> > n_pages = file->f_mapping->host->i_size >> PAGE_SHIFT;
> > pages = kvmalloc_array(n_pages, sizeof(*pages), GFP_KERNEL);
>
> This assumes we never have more than INT_MAX worth of pages before
> a failure.
Doh. Yeah. My bad.
regards,
dan carpenter
(Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
fs/f2fs/file.c:4011 f2fs_ioc_set_compress_option() error: uninitialized symbol
'ret'.
Old smatch warnings:
fs/f2fs/f2fs.h:2127
The copy_to_user() function returns the number of bytes remaining to be
copied, but this code should return -EFAULT.
Fixes: df747bcd5b21 ("vfio/fsl-mc: Implement VFIO_DEVICE_GET_REGION_INFO ioctl
call")
Signed-off-by: Dan Carpenter
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 8 ++
There is a signedness bug in shmem_pin_map() error handling because "i"
is unsigned. The "while (--i >= 0)" will loop forever until the system
crashes.
Fixes: bfed6708d6c9 ("drm/i915: use vmap in shmem_pin_map")
Signed-off-by: Dan Carpenter
---
drivers/gpu/drm
Fixes: 67247289688d ("vfio/fsl-mc: Allow userspace to MMAP fsl-mc device MMIO
regions")
Signed-off-by: Dan Carpenter
---
drivers/vfio/fsl-mc/vfio_fsl_mc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/vfio/fsl-mc/vfio_fsl_mc.c
b/drivers/vfio/fsl-mc/vf
Smatch complains that "ret" might be uninitialized if we don't enter
the loop. We do always enter the loop so it's a false positive, but
it's cleaner to just return a literal zero and that silences the
warning as well.
Signed-off-by: Dan Carpenter
---
drivers/net/ethernet/hisilicon/h
ore allocations, then use gotos to unwind.
Ideally there would be a ql_deinit_device() function to mirror the
ql_init_device() function. The ql_init_device() is staging quality
code with leaks and bad label names. It should be re-written to free
things one step at a time instead of calling ql_release_all().
Anyway, let's not introduce new leaks at least.
regards,
dan carpenter
On Sat, Oct 10, 2020 at 04:18:11PM +0300, Dan Carpenter wrote:
> On Sat, Oct 10, 2020 at 02:07:13PM +0200, Jérôme Pouiller wrote:
> > On Friday 9 October 2020 20:51:01 CEST Kalle Valo wrote:
> > > CAUTION: This email originated from outside of the organization. Do not
> &g
> dereference 'tmp_buf'
> > >227 tmp_buf = kmemdup(pds->data, pds->size, GFP_KERNEL);
> > >228 ret = wfx_send_pds(wdev, tmp_buf, pds->size);
> > > ^^^
> > >229 kfree(tmp_buf);
>
: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/power/supply/bq25790_charger.c:170 bq25790_usb_work() warn: ignoring
unreachable code.
drivers/power/supply
as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
arch/x86/kvm/svm/nested.c:1153 svm_set_nested_state() error: uninitialized
symbol 'save'.
arch/x86/kvm/svm
tly in the code. Don't introduce
indirection if you can help it.
> + int regs_num = (seg_header->seg_size - header_size) / sizeof(u32);
> + int err;
> +
regards,
dan carpenter
uct devlink *devlink;
> + struct qlge_devlink *ql_devlink;
> +
> + devlink = devlink_alloc(_devlink_ops, sizeof(struct qlge_devlink));
> + if (!devlink)
> + return -ENOMEM;
> + ql_devlink = devlink_priv(devlink);
>
> ndev = alloc_etherdev_mq(sizeof(struct ql_adapter),
>min(MAX_CPUS,
> @@ -4614,6 +4624,16 @@ static int qlge_probe(struct pci_dev *pdev,
> free_netdev(ndev);
> return err;
> }
> +
> + err = devlink_register(devlink, >dev);
> + if (err) {
> + goto devlink_free;
> + }
Checkpatch warning.
regards,
dan carpenter
' required = '(struct ieee80211_supported_band)->n_bitrates'
Some of these are unpublished checks that I haven't published because
they are too crap. The rest of the email is just long explanations.
Skip if not required.
regards,
dan carpenter
#1
drivers/staging/wfx/hif_tx.c:319 hif_join() erro
align = BIT_ULL(align_order);
"align_order" comes from sscanf() so Smatch thinks it's not trusted.
Anything above 63 is undefined behavior. There should be a bounds check
on this but I don't know what the valid values of "align" are.
regards,
dan carpenter
9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/pci/hotplug/pciehp_hpc.c:313 pciehp_check_link_status() warn: maybe use
&& instead of &
vim +313 drivers/pci/hotplug/
9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/net/ethernet/intel/ice/ice_main.c:789 ice_set_dflt_mib() warn: variable
dereferenced before check 'pf' (see line 782)
vim +/pf +789
: i386-randconfig-m021-20201002 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/dma-buf/heaps/system_heap.c:496 system_heap_create() warn
: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_link.c:5638
bnx2x_link_settings_status() warn: signedness bug returning '(-22
(attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/input/touchscreen/nt36xxx.c:470 nt36xxx_i2c_chip_version_init() warn:
calling memset(x
re as the previous comparison issue
> reported by zero day.
It was reported on Sep 25. I forward those zero day bot emails.
https://lore.kernel.org/lkml/20200925123858.GX18329@kadam/
regards,
dan carpenter
te it like this:
if (on == 0)
return power_down(sd);
ret = power_up(sd);
if (ret)
return ret;
return gc0310_init(sd);
regards,
dan carpenter
struct bq25980_device *bq = power_supply_get_drvdata(psy);
> int ret = 0;
I'm surprised this doesn't generate a set but not used warning. And
then at the end of the function it could be changed from "return ret;"
to "return 0;"
regards,
dan carpenter
(Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/gpu/drm/vboxvideo/vbox_main.c:146 vbox_hw_init() warn:
'vbox->guest_heap' not released on lines: 126.
vim +146 drivers/
-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
smatch warnings:
drivers/net/ethernet/intel/i40e/i40e_debugfs.c:582 i40e_dbg_dump_desc() error:
uninitialized symbol 'ring'.
vim +/ring +582 drivers
ommas are used deliberately to replace curly braces are
just evil. Either way the code is cleaner with semi-colons.
regards,
dan carpenter
ret = -ENOMEM;
> goto irq_malloc;
It shouldn't do a goto, it should just return directly. The goto
releases an IRQ which isn't acquired until later in the function.
regards,
dan carpenter
On Tue, Sep 29, 2020 at 07:34:39AM +0530, Souptick Joarder wrote:
> Hi Dan,
>
>
> On Mon, Sep 28, 2020 at 2:08 PM Dan Carpenter
> wrote:
> >
> > On Sun, Sep 27, 2020 at 08:38:04PM +0530, Souptick Joarder wrote:
> > > Inside alloc_user_pages() based
BUG_ON(). Checkpatch will complain about them. An Oops gives
basically the same information as a BUG_ON() without completely killing
the kernel so just dereferencing a NULL is preferable. Finally, we can
see from the callers that "hdm_ch" is never NULL.
regards,
dan carpenter
46 ("[SCSI] be2iscsi: Adding msix and mcc_rings V3")
Signed-off-by: Dan Carpenter
---
drivers/scsi/be2iscsi/be_main.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c
index 5c3513a4b450..202ba925
gt; Fixes: 14a638ab96c5 ("media: atomisp: use pin_user_pages() for memory
> allocation")
> Signed-off-by: Souptick Joarder
> Cc: John Hubbard
> Cc: Ira Weiny
> Cc: Dan Carpenter
> ---
> drivers/staging/media/atomisp/pci/hmm/hmm_bo.c | 13 -
> 1 file changed,
: aarch64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/phy/mediatek/phy-mtk-tphy.c:955 mtk_phy_init() warn:
'instance->da_ref_clk' not released on lines: 952.
Old sma
t" the
"devmem" pointer is either NULL or freed.
Neither the allocation nor the call to request_free_mem_region() has to
be done under the lock so I moved those to the start of the function.
Fixes: 1f9c4bb986d9 ("mm/memremap_pages: convert to 'struct range'")
Signed-of
as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot
Reported-by: Dan Carpenter
New smatch warnings:
drivers/net/phy/dp83869.c:205 dp83869_set_wol() warn: impossible condition
'(val_rxcfg < 0) => (0-u16m
ir)->task = current;
390 return de;
Which means that we return a NULL "de" and "*res_page" is uninitialized
and that matches what syzbot found throug runtime testing.
391 }
regards,
dan carpenter
EQ_BEACON_INTERVAL_WR);
> + return r;
Delete the "r" variable.
> +}
> +
> +static int hw_init(struct purelifi_chip *chip)
> +{
> + return purelifi_set_beacon_interval(chip, 100, 0, 0);
> +}
This is a oneline function which is only called once. Move it inline.
> +
> +int purelifi_chip_init_hw(struct purelifi_chip *chip)
> +{
> + int r;
> +
> + r = hw_init(chip);
> + if (r)
> + goto out;
Just return directly. The little bunny hop doesn't add anything.
> +
> + print_id(chip);
> +out:
> + return r;
> +}
Anyway, those are some ideas.
regards,
dan carpenter
Smatch has a tool to show where struct members are set.
`~/smatch/smatch_data/db/smdb.py where console_font height`
It's not perfect and this output comes from allmodconfig on yesterday's
linux-next.
regards,
dan carpenter
drivers/video/console/vgacon.c | vgacon_init
GFP_KERNEL);
> > if (!new_chunks)
>
> Need to call mutex_unlock(>devmem_lock).
> In fact, why not make this goto err_unlock and add
> err_unlock: mutex_unlock() before the err_release:.
Ugh... Thanks for catching that.
regards,
dan carpenter
t" the
"devmem" pointer is either NULL or freed.
Neither the allocation nor the call to request_free_mem_region() has to
be done under the lock so I moved those to the start of the function.
Fixes: b2ef9f5a5cb3 ("mm/hmm/test: add selftest driver for HMM")
Signed-off-by: Da
ap.c:3185
> > __mmput+0x113/0x370 kernel/fork.c:1076
> > exit_mm+0x4cd/0x550 kernel/exit.c:483
> > do_exit+0x576/0x1f20 kernel/exit.c:793
> > do_group_exit+0x161/0x2d0 kernel/exit.c:903
> > __do_sys_exit_group+0x13/0x20 kernel/exit.c:914
> > __se_sys_exit_group+0x10/0x10 kernel/exit.c:912
> > __x64_sys_exit_group+0x37/0x40 kernel/exit.c:912
> > do_syscall_64+0x31/0x70 arch/x86/entry/common.c:46
> > entry_SYSCALL_64_after_hwframe+0x44/0xa9
>
> Hard to understand what the syzbot reported because it's been there after
> 2beaf3280e57 ("sched/core: Add function to sample state of locked-down task").
> Why does it take a couple months to trigger if this is a routine test.
I think this was already fix in linux-next commit 9e097980efe9
("sched/core: Allow try_invoke_on_locked_down_task() with irqs disabled")
regards,
dan carpenter
The "i" iterator is never set to zero. This probably doesn't affect
testing because GCC sometimes initializes variables and also we have a
new pluggin to initialize stack variables to zero.
Fixes: 7edd32a9e614 ("drm/i915: use vmap in i915_gem_object_map")
Signed-off-by: D
401 - 500 of 9295 matches
Mail list logo