No description
Find a file
Guenter Roeck 7aeef1548a hwmon: (lm90) Fix error return value from detect function
lm90_detect_nuvoton() is supposed to return NULL if it can not detect
a chip, or a pointer to the chip name if it does. Under some circumstances
it returns an error pointer instead. Some versions of gcc interpret an
ERR_PTR as region of size 0 and generate an error message.

  In function ‘__fortify_strlen’,
      inlined from ‘strlcpy’ at ./include/linux/fortify-string.h:159:10,
      inlined from ‘lm90_detect’ at drivers/hwmon/lm90.c:2550:2:
  ./include/linux/fortify-string.h:50:33: error:
      ‘__builtin_strlen’ reading 1 or more bytes from a region of size 0
     50 | #define __underlying_strlen     __builtin_strlen
        |                                 ^
  ./include/linux/fortify-string.h:141:24: note:
      in expansion of macro ‘__underlying_strlen’
    141 |                 return __underlying_strlen(p);
        |                        ^~~~~~~~~~~~~~~~~~~

Returning NULL instead of ERR_PTR() fixes the problem.

Fixes: c7cebce984 ("hwmon: (lm90) Rework detect function")
Reported-by: Ingo Molnar <mingo@kernel.org>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Kees Cook <keescook@chromium.org>
Tested-by: Ingo Molnar <mingo@kernel.org>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
2022-08-10 00:49:46 -07:00
arch Fixes include: 2022-08-09 09:39:25 -07:00
block block: convert to advancing variants of iov_iter_get_pages{,_alloc}() 2022-08-08 22:37:22 -04:00
certs certs: make system keyring depend on x509 parser 2022-07-24 12:53:55 -07:00
crypto iov_iter stuff, part 2, rebased 2022-08-08 20:04:35 -07:00
Documentation NFSD 6.0 Release Notes 2022-08-09 14:56:49 -07:00
drivers hwmon: (lm90) Fix error return value from detect function 2022-08-10 00:49:46 -07:00
fs NFSD 6.0 Release Notes 2022-08-09 14:56:49 -07:00
include add barriers to buffer_uptodate and set_buffer_uptodate 2022-08-09 15:03:02 -07:00
init Modules updates for 6.0 2022-08-08 14:12:19 -07:00
io_uring iov_iter work, part 1 - isolated cleanups and optimizations. 2022-08-03 13:50:22 -07:00
ipc Updates to various subsystems which I help look after. lib, ocfs2, 2022-08-07 10:03:24 -07:00
kernel remoteproc updates for v5.20 2022-08-08 15:16:29 -07:00
lib iov_iter stuff, part 2, rebased 2022-08-08 20:04:35 -07:00
LICENSES LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers 2021-12-16 14:33:10 +01:00
mm memblock updates for v5.20 2022-08-09 09:48:30 -07:00
net NFSD 6.0 Release Notes 2022-08-09 14:56:49 -07:00
samples Tracing updates for 5.20 / 6.0 2022-08-05 09:41:12 -07:00
scripts Modules updates for 6.0 2022-08-08 14:12:19 -07:00
security linux-kselftest-kunit-5.20-rc1 2022-08-02 19:34:45 -07:00
sound sound updates for 6.0-rc1 2022-08-06 10:19:51 -07:00
tools memblock updates for v5.20 2022-08-09 09:48:30 -07:00
usr Not a lot of material this cycle. Many singleton patches against various 2022-05-27 11:22:03 -07:00
virt Merge remote-tracking branch 'kvm/next' into kvm-next-5.20 2022-08-01 03:21:00 -04:00
.clang-format clang-format: Fix space after for_each macros 2022-05-20 19:27:16 +02:00
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore kbuild: split the second line of *.mod into *.usyms 2022-05-08 03:16:59 +09:00
.mailmap Updates to various subsystems which I help look after. lib, ocfs2, 2022-08-07 10:03:24 -07:00
COPYING
CREDITS drm for 5.20/6.0 2022-08-03 19:52:08 -07:00
Kbuild
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS 12 server fixes, including for oopses, memory leaks and adding a channel lock 2022-08-08 20:15:13 -07:00
Makefile linux-kselftest-next-5.20-rc1 2022-08-02 19:44:56 -07:00
README

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.