lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 20 Sep 2023 07:17:14 +0000
From:   Tomer Tayar <ttayar@...ana.ai>
To:     Nick Desaulniers <ndesaulniers@...gle.com>
CC:     Oded Gabbay <ogabbay@...nel.org>,
        LKML <linux-kernel@...r.kernel.org>,
        clang-built-linux <llvm@...ts.linux.dev>
Subject: Re: -Wuninitialized in drivers/accel/habanalabs/common/memory.c
 introduced by aa7b6367186e

On 20/09/2023 0:01, Nick Desaulniers wrote:
> commit aa7b6367186e ("accel/habanalabs: tiny refactor of hl_map_dmabuf()")
>
> introduced a warning that's breaking the build in linux-next.
>
> drivers/accel/habanalabs/common/memory.c:1735:11: error: variable
> 'hdev' is uninitialized when used here [-Werror,-Wuninitialized]
> 317 1735 | dev_dbg(hdev->dev, "Failed to map dmabuf because p2p is disabled\n");
> 318 | ^~~~
> 319/builds/linux/include/linux/dev_printk.h:155:18: note: expanded
> from macro 'dev_dbg'
> 320 155 | dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
> 321 | ^~~
> 322/builds/linux/include/linux/dynamic_debug.h:274:7: note: expanded
> from macro 'dynamic_dev_dbg'
> 323 274 | dev, fmt, ##__VA_ARGS__)
> 324 | ^~~
> 325/builds/linux/include/linux/dynamic_debug.h:250:59: note: expanded
> from macro '_dynamic_func_call'
> 326 250 | _dynamic_func_call_cls(_DPRINTK_CLASS_DFLT, fmt, func, ##__VA_ARGS__)
> 327 | ^~~~~~~~~~~
> 328/builds/linux/include/linux/dynamic_debug.h:248:65: note: expanded
> from macro '_dynamic_func_call_cls'
> 329 248 | __dynamic_func_call_cls(__UNIQUE_ID(ddebug), cls, fmt, func,
> ##__VA_ARGS__)
> 330 | ^~~~~~~~~~~
> 331/builds/linux/include/linux/dynamic_debug.h:224:15: note: expanded
> from macro '__dynamic_func_call_cls'
> 332 224 | func(&id, ##__VA_ARGS__); \
> 333 | ^~~~~~~~~~~
> 334/builds/linux/drivers/accel/habanalabs/common/memory.c:1731:24:
> note: initialize the variable 'hdev' to silence this warning
> 335 1731 | struct hl_device *hdev;
> 336 | ^
> 337 | = NULL
>
>
> Please fix. Also, please post your patches to LKML so people can post
> info like this in response directly to your patch.  I could not find
> aa7b6367186e on lore.
> --
> Thanks,
> ~Nick Desaulniers

Thanks Nick, we will send a fix for it.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ