No description
  • C 96.9%
  • Assembly 0.9%
  • Rust 0.6%
  • Shell 0.6%
  • Python 0.5%
  • Other 0.3%
Find a file
Alice Ryhl d3cd3efadd binder: remove "invalid inc weak" check
commit d90eeb8ecd upstream.

There are no scenarios where a weak increment is invalid on binder_node.
The only possible case where it could be invalid is if the kernel
delivers BR_DECREFS to the process that owns the node, and then
increments the weak refcount again, effectively "reviving" a dead node.

However, that is not possible: when the BR_DECREFS command is delivered,
the kernel removes and frees the binder_node. The fact that you were
able to call binder_inc_node_nilocked() implies that the node is not yet
destroyed, which implies that BR_DECREFS has not been delivered to
userspace, so incrementing the weak refcount is valid.

Note that it's currently possible to trigger this condition if the owner
calls BINDER_THREAD_EXIT while node->has_weak_ref is true. This causes
BC_INCREFS on binder_ref instances to fail when they should not.

Cc: stable@vger.kernel.org
Fixes: 457b9a6f09 ("Staging: android: add binder driver")
Reported-by: Yu-Ting Tseng <yutingtseng@google.com>
Signed-off-by: Alice Ryhl <aliceryhl@google.com>
Link: https://patch.msgid.link/20251015-binder-weak-inc-v1-1-7914b092c371@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2025-10-29 14:04:39 +01:00
arch RISC-V: Don't print details of CPUs disabled in DT 2025-10-29 14:04:38 +01:00
block blk-crypto: fix missing blktrace bio split events 2025-10-19 16:23:12 +02:00
certs sign-file,extract-cert: use pkcs11 provider for OPENSSL MAJOR >= 3 2025-04-25 10:44:04 +02:00
crypto crypto: essiv - Check ssize for decryption and in-place encryption 2025-10-19 16:23:10 +02:00
Documentation doc: fix seg6_flowlabel path 2025-10-29 14:04:33 +01:00
drivers binder: remove "invalid inc weak" check 2025-10-29 14:04:39 +01:00
fs ocfs2: clear extent cache after moving/defragmenting extents 2025-10-29 14:04:37 +01:00
include net/ip6_tunnel: Prevent perpetual tunnel growth 2025-10-29 14:04:33 +01:00
init init: handle bootloader identifier in kernel parameters 2025-10-19 16:23:13 +02:00
io_uring io_uring: correct __must_hold annotation in io_install_fixed_file 2025-10-29 14:04:38 +01:00
ipc ipc: fix to protect IPCS lookups using RCU 2025-06-27 11:07:30 +01:00
kernel sched/fair: Fix pelt lost idle time detection 2025-10-29 14:04:35 +01:00
lib asm-generic/io: Add _RET_IP_ to MMIO trace for more accurate debug info 2025-10-19 16:23:22 +02:00
LICENSES LICENSES/LGPL-2.1: Add LGPL-2.1-or-later as valid identifiers 2021-12-16 14:33:10 +01:00
mm mm/hugetlb: early exit from hugetlb_pages_alloc_boot() when max_huge_pages=0 2025-10-19 16:23:18 +02:00
net vsock: fix lock inversion in vsock_assign_transport() 2025-10-29 14:04:37 +01:00
rust rust: module: place cleanup_module() in .exit.text section 2025-07-06 10:57:54 +02:00
samples ftrace/samples: Fix function size computation 2025-09-19 16:29:56 +02:00
scripts gcc-plugins: Remove TODO_verify_il for GCC >= 16 2025-10-15 11:56:20 +02:00
security KEYS: trusted_tpm1: Compare HMAC values in constant time 2025-10-19 16:23:14 +02:00
sound ALSA: usb-audio: Fix NULL pointer deference in try_to_register_card 2025-10-29 14:04:35 +01:00
tools selftests: mptcp: join: mark implicit tests as skipped if not supported 2025-10-29 14:04:38 +01:00
usr kbuild: hdrcheck: fix cross build with clang 2025-06-27 11:07:25 +01:00
virt KVM: Fix a data race on last_boosted_vcpu in kvm_vcpu_on_spin() 2024-06-27 13:46:21 +02:00
.clang-format inet: ping: use hlist_nulls rcu iterator during lookup 2022-12-01 12:42:46 +01:00
.cocciconfig scripts: add Linux .cocciconfig for coccinelle 2016-07-22 12:13:39 +02:00
.get_maintainer.ignore get_maintainer: add Alan to .get_maintainer.ignore 2022-08-20 15:17:44 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore Remove *.orig pattern from .gitignore 2024-10-17 15:21:15 +02:00
.mailmap 9 hotfixes. 6 for MM, 3 for other areas. Four of these patches address 2022-12-10 17:10:52 -08:00
.rustfmt.toml rust: add .rustfmt.toml 2022-09-28 09:02:20 +02:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Remove Michal Marek from Kbuild maintainers 2022-11-16 14:53:00 +09:00
Kbuild Kbuild updates for v6.1 2022-10-10 12:00:45 -07:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS sign-file,extract-cert: move common SSL helper functions to a header 2025-04-25 10:44:04 +02:00
Makefile Linux 6.1.157 2025-10-19 16:23:23 +02:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

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.