Skip to content

Add Linux Kernel 7.2 support#1227

Open
ThePedroo wants to merge 2 commits into
NVIDIA:mainfrom
ThePedroo:main
Open

Add Linux Kernel 7.2 support#1227
ThePedroo wants to merge 2 commits into
NVIDIA:mainfrom
ThePedroo:main

Conversation

@ThePedroo

Copy link
Copy Markdown

This PR replaces strncpy with strscpy (removed in 7.2 https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1a3746ccbb0a97bed3c06ccde6b880013b1dddc1) and adds a conftest to handle a 7.2 commit (https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5164f7e7ff8e) also renaming drm_atomic_state to drm_atomic_commit.

One of strncpy was replaced with memcpy as it is more appropriate than strscpy.

ThePedroo added 2 commits July 1, 2026 01:01
This commit replaces all usages of "strncpy" to use "strscpy". Since Linux 7.2-rc.1, "strncpy" has been fully removed from the source, and cannot be used by drivers anymore (see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1a3746ccbb0a97bed3c06ccde6b880013b1dddc1). We also replace one of the "strncpy" for "memcpy", since "strscpy" is not suitable either here, due to always NUL terminate.
This commit addresses the rename (see https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=5164f7e7ff8e) by adding a new conftest to see if it was renamed, and if so, use it.
@CLAassistant

CLAassistant commented Jul 2, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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.

2 participants