Go to file
Hans de Goede 9c9c33ea4c power: supply: bq27xxx: Fix kernel crash on IRQ handler register error
[ Upstream commit cdf10ffe8f626d8a2edc354abf063df0078b2d71 ]

When registering the IRQ handler fails, do not just return the error code,
this will free the devm_kzalloc()-ed data struct while leaving the queued
work queued and the registered power_supply registered with both of them
now pointing to free-ed memory, resulting in various kernel crashes
soon afterwards.

Instead properly tear-down things on IRQ handler register errors.

Fixes: 703df6c097 ("power: bq27xxx_battery: Reorganize I2C into a module")
Cc: Andrew F. Davis <afd@ti.com>
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2021-11-18 14:04:21 +01:00
arch mips: cm: Convert to bitfield API to fix out-of-bounds access 2021-11-18 14:04:21 +01:00
block block: remove inaccurate requeue check 2021-11-18 14:03:58 +01:00
certs certs: Trigger creation of RSA module signing key if it's not an RSA key 2021-09-15 09:50:29 +02:00
crypto crypto: pcrypt - Delay write to padata->info 2021-11-18 14:04:12 +01:00
Documentation fscrypt: allow 256-bit master keys with AES-256-XTS 2021-11-18 14:03:54 +01:00
drivers power: supply: bq27xxx: Fix kernel crash on IRQ handler register error 2021-11-18 14:04:21 +01:00
fs JFS: fix memleak in jfs_mount 2021-11-18 14:04:15 +01:00
include tpm: fix Atmel TPM crash caused by too frequent queries 2021-11-18 14:04:11 +01:00
init sched/core: Initialize the idle task with preemption disabled 2021-07-14 16:55:50 +02:00
ipc ipc/mqueue, msg, sem: avoid relying on a stack reference past its expiry 2021-05-26 12:06:54 +02:00
kernel bpf: Fix propagation of signed bounds from 64-bit min/max into 32-bit. 2021-11-18 14:04:13 +01:00
lib lib/xz: Validate the value before assigning it to an enum variable 2021-11-18 14:03:58 +01:00
LICENSES
mm mm: khugepaged: skip huge page collapse for special files 2021-11-06 14:10:09 +01:00
net udp6: allow SO_MARK ctrl msg to affect routing 2021-11-18 14:04:13 +01:00
samples samples/kretprobes: Fix return value if register_kretprobe() failed 2021-11-18 14:04:11 +01:00
scripts leaking_addresses: Always print a trailing newline 2021-11-18 14:03:57 +01:00
security smackfs: use netlbl_cfg_cipsov4_del() for deleting cipso_v4_doi 2021-11-18 14:04:10 +01:00
sound ASoC: cs42l42: Correct configuring of switch inversion from ts-inv 2021-11-18 14:04:21 +01:00
tools bpf: Fix propagation of bounds from 64-bit min/max into 32-bit and var_off. 2021-11-18 14:04:13 +01:00
usr
virt KVM: do not shrink halt_poll_ns below grow_start 2021-10-09 14:40:58 +02:00
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore kbuild: generate Module.symvers only when vmlinux exists 2021-05-19 10:12:59 +02:00
.mailmap mailmap: add two more addresses of Uwe Kleine-König 2020-12-06 10:19:07 -08:00
COPYING
CREDITS MAINTAINERS: Move Jason Cooper to CREDITS 2020-11-30 10:20:34 +01:00
Kbuild
Kconfig
MAINTAINERS f2fs: move ioctl interface definitions to separated file 2021-05-19 10:13:00 +02:00
Makefile Linux 5.10.79 2021-11-12 14:58:35 +01: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.