Skip to content

hid-ayaneo: sync to the upstream v3 state - #11

Closed
matmartinez wants to merge 6 commits into
OpenGamingCollective:masterfrom
matmartinez:hid-ayaneo-v3-sync
Closed

matmartinez wants to merge 6 commits into
OpenGamingCollective:masterfrom
matmartinez:hid-ayaneo-v3-sync

Conversation

@matmartinez

@matmartinez matmartinez commented Aug 28, 2026 •

Copy link
Copy Markdown

Follow-up to #3 and #5, as invited. This brings hid-ayaneo in the tree up to the current upstream submission state: the rest of the LKML v2 round (#5 already carried its teardown-UAF fix), plus everything adopted from @pastaq's review on #3.

Commits, in order:

  1. sync remaining changes from the upstream v2 submission: eject-loop bail on fatal errors, maxcollection guard before touching hdev->collection, drop the joystick-sensitivity bytes from the config command so the firmware setting is left alone (hardware-verified), breathing effect via the stock ledtrig-pattern hw_pattern ABI, and a comment on reply matching. Matches the v2 series on lore.
  2. name and justify firmware timing constants
  3. use generic ayaneo_ prefix for driver plumbing (wire constants stay AYA3_*)
  4. describe the wire format with packed structs, with static_asserts and the vibration levels as an enum
  5. take the command lock with scoped guards, scoped_cond_guard(mutex_intr, ...) at every lock site
  6. mark the LED classdev LED_COLOR_ID_RGB

Commits 3 through 6 are the items adopted from the #3 review. The remaining review points are deferred to the upstream v3 cover letter as proposed ABI growth (rumble_intensity plus index attrs, eject_index, and the hid to ayaneo-ec notification framework, which needs the pdx86 folks on Cc). The RGB debounce question was resolved in the #3 thread with hardware measurements: brightness_set_blocking gets core-level deferral and coalescing, 5.3 ms average command round trip, and 1000 back-to-back sysfs stores complete in 12 ms without blocking the writer.

Hardware validation (AYANEO 3, Bazzite 44, kernel 7.2.0-ogc6.1): this exact file builds clean and is what I'm running daily. Module IDs read correctly through the new struct offsets, solid/pulse/off all ACKed (pulse visually confirmed), malformed hw_pattern writes are rejected, module reload cycles and dmesg are clean, and the teardown fix previously survived repeated unbind-under-brightness-hammer rounds.

After this lands the tree matches what will go out as v3 to LKML. v3 additionally grows only the Cc list and cover letter; no further code delta is planned unless upstream review asks for one.

The teardown use-after-free fix from v2 is already in the tree; bring
over the rest of that round:

- bail out of the eject polling loop on fatal command errors instead
  of burning the full 8s budget; only -ETIMEDOUT keeps polling, since
  the device goes mute mid-eject
- guard the vendor-interface match with hdev->maxcollection so a
  descriptor with no collections cannot dereference hdev->collection
- stop writing the joystick-sensitivity bytes in the config command;
  leaving them zero preserves the firmware setting instead of
  clobbering it on every RGB update (verified on hardware)
- expose the firmware's fixed breathing effect through the
  ledtrig-pattern hw_pattern ABI as the two-step pattern
  "0 <t> <brightness> <t>"; the period is firmware-controlled
- document why matching replies by subcommand echo alone is safe

Matches the driver as submitted upstream in
lore.kernel.org/linux-input/20260824223103.93947-1-hello@matias.me;
re-validated on an AYANEO 3.

Signed-off-by: Matías Martínez <hello@matias.me>
Replace the bare msleep/loop-bound literals with named constants and
a comment recording where the timings come from (the Handheld Daemon
implementation of this protocol) and what was validated on hardware.

Signed-off-by: Matías Martínez <hello@matias.me>
Keep entry points and driver structure generic so a future device or
protocol revision slots in without churn. Wire-protocol constants
stay AYA3_* since they are specific to this firmware generation.

Suggested-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Matías Martínez <hello@matias.me>
Replace the byte-offset defines with packed aya3_config/aya3_resp
structs (hid-lenovo-go idiom), static_assert their sizes against the
report sizes, and name every firmware vibration level in an enum
instead of a lone default define.

Suggested-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Matías Martínez <hello@matias.me>
Use scoped_cond_guard(mutex_intr, ...) at every interruptible lock
site so the unlock cannot be dropped in a future edit. Probe already
used scoped_guard.

Suggested-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Matías Martínez <hello@matias.me>
Lets userspace detect the RGB interface generically, same as hid-msi,
hid-oxp and hid-lenovo-go.

Suggested-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Matías Martínez <hello@matias.me>

@pastaq pastaq left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since at least one version has been sent to LKML, the regular kernel is more appropriate for these patches. Unstable is generally for not reviewed and not submitted patches as a pre-screen before upstreaming, and for making it easier for users to test before it is upstreamed.

When pulling into the stable kernel, use b4 am -cl <url> to pull in the patches with the ML link, then use git rebase -i <sha> to edit the commit message for each patch and add a preceding [FROM-ML] to the header.

Thanks.

@pastaq pastaq closed this Aug 31, 2026
@sknowledge1

Copy link
Copy Markdown

@matmartinez, following pastaq's request in
OGC/linux #122,
I have a local revision to coordinate with your v4 instead of extending the
release-tree RFC independently:

  • One effect interface: monocolor, breathe, rainbow; Off uses brightness
    zero and preserves the selection. Both animated effects keep firmware timing.
  • An indexed enum/table, LED-core brightness and multicolour components, consistent
    drvdata naming, error rollback, and manual-effect exclusion while a trigger
    owns the LED. The separate hw_pattern selector and RGB/brightness caches are
    removed.
  • LED-core suspend/resume using the callback's brightness argument, keeping the
    existing matching and teardown fixes separately reviewable.
  • A separate [NOT-FOR-UPSTREAM] LED-name-only patch for
    go:rgb:joystick_rings, following the OGC AYN precedent. It changes no USB/HID
    identity and adds no fictitious speed/profile attributes. Steam compatibility
    is still a rollout gate, not an established result.

Both named module variants compile with W=1 against the test kernel's 7.2.4
headers. A compile-only check without trigger members and extracted-function
ASan/UBSan tests pass: 107,520 complete packet cases for each trigger layout,
plus effect, suspend-state and transport-failure cases. The real-descriptor HID
matching fixture is retained. These are source checks, not proof of Steam or
resume behavior. Device changes are currently deferred, and the revised kernel
commits still require fresh personal human sign-off before publication.

InputPlumber #734 and OGUI #552 are now drafts; the default path will exclude
AYANEO ring ownership from InputPlumber and direct the optional Decky plugin to
Steam. Bazzite's existing generic LED permissions suffice for the proposed name.

Which v4 base/branch would you like the effect/lifecycle delta reconciled against
for pre-mailing-list review here in linux-unstable? The current local test delta
starts from the signed #122 head; I have not submitted a competing mailing-list
series or claimed your acceptance. #122 will stay open until a coordinated
replacement is linked.

This coordination note and the local revision were prepared with Codex GPT-6
assistance under the repository owner's approved plan.

github-actions Bot pushed a commit that referenced this pull request Oct 20, 2026
KaFai Wan says:

====================
selftests/bpf: Fix prog_tests framework self-tests

Three prog_tests framework self-tests fail depending on how test_progs
is invoked:

- ./test_progs -t prog_tests_framework/test_fail -v
  test_prog_tests_framework:FAIL:skip_cnt_check
  unexpected skip_cnt_check: actual 0 != expected 2

- ./test_progs -t prog_tests_framework_expected_msgs -v
  Caught signal #11!
  Stack trace:
  ./test_progs(crash_handler+0x38)[0x55620006fbb0]

- ./test_progs -t prog_tests_framework_compare_text -v
  test_prog_tests_framework_compare_text:PASS:mismatch_rc 0 nsec
  Caught signal #11!
  Stack trace:
  ./test_progs(crash_handler+0x38)[0x564ddbfcfbb0]

Patch #1 counts the subtests that actually ran, so the skip and error
count checks no longer fail when -t or -n filters out some subtests.

Patches #2 and #3 skip the subtests that inspect the log buffer when the
output is not captured, such as with -v in non-parallel mode, instead of
crashing on a NULL log_buf.
---
====================

Link: https://patch.msgid.link/20261012140202.2754552-1-kafai.wan@linux.dev
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
github-actions Bot pushed a commit to scardracs/linux-unstable that referenced this pull request Oct 27, 2026
The perf_hpp_list was not freed after use.  Let's add it for the main
c2c hists list in perf c2c report and a local list in print_pareto().

Previously it was detected by ASAN like below.

  =================================================================
  ==42183==ERROR: LeakSanitizer: detected memory leaks

  Indirect leak of 1064 byte(s) in 7 object(s) allocated from:
      #0 0x7f17334ef24f in calloc (/lib64/libasan.so.8+0xef24f) (BuildId: 61e8165ca90f7a4f06b73f064a938c76deaae079)
      OpenGamingCollective#1 0x0000005fa099 in zalloc  ../../lib/zalloc.c:8
      OpenGamingCollective#2 0x0000004faf6d in get_format  tools/perf/builtin-c2c.c:1978
      OpenGamingCollective#3 0x0000004fb45e in c2c_hists__init_output  tools/perf/builtin-c2c.c:2004
      OpenGamingCollective#4 0x0000004fb7de in __hpp_list__parse  tools/perf/builtin-c2c.c:2047
      OpenGamingCollective#5 0x0000004fbae9 in hpp_list__parse  tools/perf/builtin-c2c.c:2085
      OpenGamingCollective#6 0x0000004fee13 in print_pareto  tools/perf/builtin-c2c.c:2563
      OpenGamingCollective#7 0x0000004ffcd7 in perf_c2c__hists_fprintf  tools/perf/builtin-c2c.c:2708
      OpenGamingCollective#8 0x000000500ab5 in perf_c2c_display  tools/perf/builtin-c2c.c:2949
      OpenGamingCollective#9 0x0000005045c3 in perf_c2c__report  tools/perf/builtin-c2c.c:3522
      OpenGamingCollective#10 0x000000505caa in cmd_c2c  tools/perf/builtin-c2c.c:3676
      OpenGamingCollective#11 0x0000005df50e in run_builtin  tools/perf/perf.c:383
      OpenGamingCollective#12 0x0000005df9b1 in handle_internal_command  tools/perf/perf.c:436
      OpenGamingCollective#13 0x0000005dfd7f in run_argv  tools/perf/perf.c:480
      OpenGamingCollective#14 0x0000005e02d6 in main  tools/perf/perf.c:581
      OpenGamingCollective#15 0x7f1729450680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c)
      OpenGamingCollective#16 0x7f1729450797 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3797) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c)
      OpenGamingCollective#17 0x000000409c34 in _start (tools/perf/perf+0x409c34) (BuildId: 36a64600776d92e4ab7dfd5ca20c92280d72a645)

  SUMMARY: AddressSanitizer: 1064 byte(s) leaked in 7 allocation(s).

Fixes: c75540e ("perf c2c report: Add dimension support")
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
github-actions Bot pushed a commit to scardracs/linux-unstable that referenced this pull request Oct 30, 2026
The perf_hpp_list was not freed after use.  Let's add it for the main
c2c hists list in perf c2c report and a local list in print_pareto().

Previously it was detected by ASAN like below.

  =================================================================
  ==42183==ERROR: LeakSanitizer: detected memory leaks

  Indirect leak of 1064 byte(s) in 7 object(s) allocated from:
      #0 0x7f17334ef24f in calloc (/lib64/libasan.so.8+0xef24f) (BuildId: 61e8165ca90f7a4f06b73f064a938c76deaae079)
      OpenGamingCollective#1 0x0000005fa099 in zalloc  ../../lib/zalloc.c:8
      OpenGamingCollective#2 0x0000004faf6d in get_format  tools/perf/builtin-c2c.c:1978
      OpenGamingCollective#3 0x0000004fb45e in c2c_hists__init_output  tools/perf/builtin-c2c.c:2004
      OpenGamingCollective#4 0x0000004fb7de in __hpp_list__parse  tools/perf/builtin-c2c.c:2047
      OpenGamingCollective#5 0x0000004fbae9 in hpp_list__parse  tools/perf/builtin-c2c.c:2085
      OpenGamingCollective#6 0x0000004fee13 in print_pareto  tools/perf/builtin-c2c.c:2563
      OpenGamingCollective#7 0x0000004ffcd7 in perf_c2c__hists_fprintf  tools/perf/builtin-c2c.c:2708
      OpenGamingCollective#8 0x000000500ab5 in perf_c2c_display  tools/perf/builtin-c2c.c:2949
      OpenGamingCollective#9 0x0000005045c3 in perf_c2c__report  tools/perf/builtin-c2c.c:3522
      OpenGamingCollective#10 0x000000505caa in cmd_c2c  tools/perf/builtin-c2c.c:3676
      OpenGamingCollective#11 0x0000005df50e in run_builtin  tools/perf/perf.c:383
      OpenGamingCollective#12 0x0000005df9b1 in handle_internal_command  tools/perf/perf.c:436
      OpenGamingCollective#13 0x0000005dfd7f in run_argv  tools/perf/perf.c:480
      OpenGamingCollective#14 0x0000005e02d6 in main  tools/perf/perf.c:581
      OpenGamingCollective#15 0x7f1729450680 in __libc_start_call_main (/lib64/libc.so.6+0x3680) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c)
      OpenGamingCollective#16 0x7f1729450797 in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x3797) (BuildId: 85075e2ae2e13352a1413d41c327dacf6461526c)
      OpenGamingCollective#17 0x000000409c34 in _start (tools/perf/perf+0x409c34) (BuildId: 36a64600776d92e4ab7dfd5ca20c92280d72a645)

  SUMMARY: AddressSanitizer: 1064 byte(s) leaked in 7 allocation(s).

Fixes: c75540e ("perf c2c report: Add dimension support")
Reviewed-by: Aaron Tomlin <atomlin@atomlin.com>
Reviewed-by: Dmitry Ilvokhin <d@ilvokhin.com>
Reviewed-by: Ian Rogers <irogers@google.com>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
github-actions Bot pushed a commit to scardracs/linux-unstable that referenced this pull request Oct 31, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
github-actions Bot pushed a commit to scardracs/linux-unstable that referenced this pull request Nov 3, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
github-actions Bot pushed a commit to scardracs/linux-unstable that referenced this pull request Nov 4, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
github-actions Bot pushed a commit to scardracs/linux-unstable that referenced this pull request Nov 5, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
github-actions Bot pushed a commit to scardracs/linux-unstable that referenced this pull request Nov 6, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
github-actions Bot pushed a commit to scardracs/linux-unstable that referenced this pull request Nov 10, 2026
An IPTFS state keeps its mode module referenced while mode_data exists.
However, iptfs_destroy_state() drops that reference before returning to
xfrm_state_gc_destroy(), which has no reference covering the callback's
return path.

With CONFIG_XFRM_IPTFS=m and module unloading enabled, deleting the last
IPTFS SA can overlap with ordinary module removal in this order:

  XFRM GC worker                      rmmod xfrm_iptfs
  iptfs_destroy_state()
    free mode_data
    module_put(owner)
    <preempted>
                                      delete_module()
                                        xfrm_iptfs_fini()
                                          unregister mode callbacks
                                        free_module()
    resume in freed module text

An unload started after the put can finish before the callback resumes.
GC invokes the callback outside an RCU read-side critical section, after
its grace period. The RCU waits in mode unregistration and module
freeing therefore do not protect the callback. The GC mutex only
serializes GC with device state flushes. Resuming the callback can cause
an instruction-fetch fault in the freed module text.

The Oops below was observed on an earlier kernel with scheduling probes
holding the worker in module_put() after the decrement until ordinary
rmmod completed. The fixture created and deleted the SA over
NETLINK_XFRM.

Take an additional reference to the already pinned owner before calling
destroy_state(), and release it in XFRM core after the callback returns.
Cache the owner before the call so releasing the extra reference does
not need to access the callback table after the callback has finished.

Oops report as below:
    BUG: unable to handle page fault for address: ffffffffc0407455
    #PF: supervisor instruction fetch in kernel mode
    #PF: error_code(0x0010) - not-present page
    PGD 80a9067 P4D 80a9067 PUD 80ab067 PMD 0
    Oops: Oops: 0010 [OpenGamingCollective#1] SMP KASAN NOPTI
    CPU: 3 UID: 0 PID: 53 Comm: kworker/3:1 Not tainted 7.2.0-rc5-pmb-xfrm-functional-v1+ OpenGamingCollective#11 PREEMPT(lazy)
    Hardware name: QEMU Ubuntu 24.04 PC v2 (i440FX + PIIX, arch_caps fix, 1996), BIOS 1.16.3-debian-1.16.3-2 04/01/2014
    Workqueue: events xfrm_state_gc_task
    RIP: 0010:0xffffffffc0407455
    Code: Unable to access opcode bytes at 0xffffffffc040742b.
    RSP: 0018:ffff8881013e7aa0 EFLAGS: 00010282
    RAX: 0000000000000000 RBX: ffffffffc02199c0 RCX: ffffffff816fc84e
    RDX: ffff8881013c0000 RSI: 0000000000000000 RDI: ffffffff86338344
    RBP: ffff8881013e7ba8 R08: 0000000000000001 R09: 0000000000000001
    R10: ffffffff893e0257 R11: ffff8881013c0000 R12: ffff888107e9ec00
    R13: ffff888102b07980 R14: ffff888107412ec0 R15: ffff8881013e7ae0
    FS:  0000000000000000(0000) GS:ffff8881fd929000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: ffffffffc040742b CR3: 00000000080a6006 CR4: 0000000000770ef0
    PKRU: 55555554
    Call Trace:
     <TASK>
     ? pmbd_gate_maybe+0x47/0x60
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? lock_is_held_type+0x8f/0x100
     xfrm_state_gc_task+0x17e/0x790
     ? lock_acquire+0x17b/0x2f0
     ? __pfx_xfrm_state_gc_task+0x10/0x10
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? lock_release+0xc8/0x280
     ? srso_alias_return_thunk+0x5/0xfbef5
     process_one_work+0x908/0x19c0
     ? __pfx_process_one_work+0x10/0x10
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? lock_is_held_type+0x8f/0x100
     ? srso_alias_return_thunk+0x5/0xfbef5
     worker_thread+0x65c/0xe40
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? __kthread_parkme+0x175/0x220
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? __pfx_worker_thread+0x10/0x10
     kthread+0x34f/0x460
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? __pfx_kthread+0x10/0x10
     ret_from_fork+0x659/0x940
     ? __pfx_ret_from_fork+0x10/0x10
     ? srso_alias_return_thunk+0x5/0xfbef5
     ? __switch_to+0x74f/0xf80
     ? __pfx_kthread+0x10/0x10
     ret_from_fork_asm+0x1a/0x30
     </TASK>
    Modules linked in: [last unloaded: xfrm_iptfs]
    CR2: ffffffffc0407455
    ---[ end trace 0000000000000000 ]---
    RIP: 0010:0xffffffffc0407455
    Code: Unable to access opcode bytes at 0xffffffffc040742b.
    RSP: 0018:ffff8881013e7aa0 EFLAGS: 00010282
    RAX: 0000000000000000 RBX: ffffffffc02199c0 RCX: ffffffff816fc84e
    RDX: ffff8881013c0000 RSI: 0000000000000000 RDI: ffffffff86338344
    RBP: ffff8881013e7ba8 R08: 0000000000000001 R09: 0000000000000001
    R10: ffffffff893e0257 R11: ffff8881013c0000 R12: ffff888107e9ec00
    R13: ffff888102b07980 R14: ffff888107412ec0 R15: ffff8881013e7ae0
    FS:  0000000000000000(0000) GS:ffff8881fd929000(0000) knlGS:0000000000000000
    CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
    CR2: ffffffffc040742b CR3: 00000000080a6006 CR4: 0000000000770ef0
    PKRU: 55555554
    Kernel panic - not syncing: Fatal exception
    Kernel Offset: disabled

Fixes: 4b3faf6 ("xfrm: iptfs: add new iptfs xfrm mode impl")
Signed-off-by: Cen Zhang <zzzccc427@gmail.com>
Assisted-by: LLM
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
github-actions Bot pushed a commit to scardracs/linux-unstable that referenced this pull request Nov 10, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  OpenGamingCollective#11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
github-actions Bot pushed a commit that referenced this pull request Nov 12, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
github-actions Bot pushed a commit that referenced this pull request Nov 13, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
github-actions Bot pushed a commit that referenced this pull request Nov 16, 2026
BPF program freeing currently runs from the system workqueue. With BPF
program pack allocations, freeing the last program in a pack can take
pack_mutex and call into execmem/vmalloc code to change page permissions.
That path may queue a vmalloc purge helper to the same CPU and wait for it
to finish.

If enough other BPF program free workers are already active on that CPU,
they can all block on pack_mutex and consume the system workqueue active
slots. The worker holding pack_mutex then waits for the vmalloc purge work,
but that purge work cannot run because the queue is full of pack_mutex
waiters:

[   24.646667] INFO: task kworker/0:4:1291 blocked for more than 10 seconds.
[   24.646669]       Not tainted 7.3.0-00001-gdeaa120a9b25-dirty #11
[   24.646670] "echo 0 > /proc/sys/kernel/hung_task_timeout_secs" disables this message.
[   24.646671] task:kworker/0:4     state:D stack:0     pid:1291  tgid:1291  ppid:2      task_flags:0x4208060 flags:0x00080000
[   24.646675] Workqueue: events bpf_prog_free_deferred
[   24.646678] Call Trace:
[   24.646680]  <TASK>
[   24.646686]  __schedule+0x5bc/0x1430
[   24.646702]  schedule+0x3f/0x100
[   24.646706]  schedule_timeout+0x106/0x110
[   24.646711]  ? srso_alias_return_thunk+0x5/0xfbef5
[   24.646713]  ? mark_held_locks+0x49/0x80
[   24.646720]  ? srso_alias_return_thunk+0x5/0xfbef5
[   24.646723]  ? lockdep_hardirqs_on_prepare+0xdc/0x190
[   24.646726]  ? srso_alias_return_thunk+0x5/0xfbef5
[   24.646732]  __wait_for_common+0xc1/0x1d0
[   24.646735]  ? __pfx_schedule_timeout+0x10/0x10
[   24.646748]  ? __flush_work+0x1f8/0x550
[   24.646751]  __flush_work+0x309/0x550
[   24.646759]  ? __pfx_wq_barrier_func+0x10/0x10
[   24.646783]  __purge_vmap_area_lazy+0x3e4/0x440
[   24.646796]  _vm_unmap_aliases+0x2d5/0x330
[   24.646810]  change_page_attr_set_clr+0xb9/0x580
[   24.646817]  ? srso_alias_return_thunk+0x5/0xfbef5
[   24.646833]  set_memory_nx+0x3b/0x50
[   24.646838]  __execmem_cache_free+0x35/0xb0
[   24.646848]  execmem_free+0x98/0x160
[   24.646864]  bpf_prog_pack_free+0x152/0x190
[   24.646871]  bpf_jit_binary_pack_free+0x17/0x90
[   24.646876]  bpf_jit_free+0x5e/0x130
[   24.646882]  process_one_work+0x289/0x790
[   24.646886]  ? srso_alias_return_thunk+0x5/0xfbef5
[   24.646888]  ? srso_alias_return_thunk+0x5/0xfbef5
[   24.646902]  worker_thread+0x1b3/0x370
[   24.646908]  ? __pfx_worker_thread+0x10/0x10
[   24.646911]  kthread+0xf7/0x130
[   24.646914]  ? __pfx_kthread+0x10/0x10
[   24.646920]  ret_from_fork+0x293/0x300
[   24.646923]  ? __pfx_kthread+0x10/0x10
[   24.646927]  ret_from_fork_asm+0x1a/0x30
[   24.646947]  </TASK>

Move deferred freeing of BPF programs, program images, and trampoline
images to a dedicated workqueue to avoid this deadlock.

Fixes: 7221066 ("mm: vmalloc: offload free_vmap_area_lock lock")
Reported-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Emil Tsalapatis <emil@etsalapatis.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://patch.msgid.link/20261109181610.7027-1-emil@etsalapatis.com
github-actions Bot pushed a commit that referenced this pull request Nov 16, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>
github-actions Bot pushed a commit that referenced this pull request Nov 17, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://lore.kernel.org/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Andy Whitcroft <apw@canonical.com>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Andi Shyti <andi.shyti@kernel.org>
Cc: Andi Shyti <andi.shyti@linux.intel.com>

 scripts/checkpatch.pl |    3 +++
 1 file changed, 3 insertions(+)
github-actions Bot pushed a commit that referenced this pull request Nov 20, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://patch.msgid.link/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Andi Shyti <andi.shyti@kernel.org>

 scripts/checkpatch.pl |    3 +++
 1 file changed, 3 insertions(+)
github-actions Bot pushed a commit that referenced this pull request Nov 21, 2026
The kernel provides the __nonnull_args() macro as the preferred form for
marking pointer arguments as non-NULL. Add a check suggesting the macro
over the raw __attribute__((nonnull)) spelling, consistent with the
existing attribute conversion suggestions.

Examples:

  WARNING: Prefer __nonnull_args(1, 2) over __attribute__((nonnull(1, 2)))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:230:
  +__attribute__((nonnull(1, 2)))

  WARNING: Prefer __nonnull_args() over __attribute__((nonnull))
  #11: FILE: drivers/soc/aspeed/aspeed-lpc-snoop.c:283:
  +__attribute__((nonnull))

Link: https://patch.msgid.link/bc2cd702455e58feb777cdb230e3ba4f7e1db60f.1793027261.git.d@ilvokhin.com
Signed-off-by: Dmitry Ilvokhin <d@ilvokhin.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Cc: David Airlie <airlied@gmail.com>
Cc: Simona Vetter <simona@ffwll.ch>
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Tvrtko Ursulin <tursulin@ursulin.net>
Cc: Lee Jones <lee@kernel.org>
Cc: Pavel Machek <pavel@kernel.org>
Cc: Joel Stanley <joel@jms.id.au>
Cc: Andrew Jeffery <andrew@codeconstruct.com.au>
Cc: Ryan Chen <ryan_chen@aspeedtech.com>
Cc: Billy Tsai <billy_tsai@aspeedtech.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Kees Cook <kees@kernel.org>
Cc: Andy Shevchenko <andy@kernel.org>
Cc: Matthew Wilcox (Oracle) <willy@infradead.org>
Cc: Joe Perches <joe@perches.com>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <skhan@linuxfoundation.org>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: Miguel Ojeda <ojeda@kernel.org>
Cc: Andi Shyti <andi.shyti@kernel.org>

 scripts/checkpatch.pl |    3 +++
 1 file changed, 3 insertions(+)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants