APPLIED: [SRU][canonical-kernel-snaps][PATCH 0/1] nvidia_hooks: replace uname -r calls

Stefan Bader stefan.bader at canonical.com
Thu Jul 3 12:05:53 UTC 2025


On 05.06.25 04:55, Aaron Jauregui wrote:
> BugLink: https://bugs.launchpad.net/bugs/2111937
> 
> [Impact]
> It was previously assumed that the currently running kernel corresponds to
> the parent kernel snap of the component being installed/refreshed. This
> does not necessarily hold true. Modules were found to be installed in the
> previous kernel snap's path in some cases, particularly after a refresh.
> This causes the modules to not be found by depmod and thus the drivers
> to not being installed.
> 
> [Fix]
> Replace uname -r to grab the parent kernel snap's kernel version string
> with getting it from the snap's filesystem with basename "$SNAP"/modules/*
> 
> [Test case]
> Built and booted pc-kernel with updated scripts, and tested the resolved
> path for nvidia-550-erd-ko and nouveau components on install and
> refresh.
> 
> [Where things could go wrong]
> The method for grabbing the kernel version string relies on having the
> kernel snap contain /modules/<kernel_version>. Removing this would break
> component install hooks. Having multiple entries in this directory would
> break the script as well. These scenarios are unlikely due to the
> pc-kernel only ever corresponding to a single kernel version.
> 
> Aaron Jauregui (1):
>    nvidia_hooks: replace uname -r calls
> 
>   hooks/module/install.module            | 7 +++++--
>   hooks/module/post-refresh.module       | 7 +++++--
>   hooks/module/remove.module             | 6 ++++--
>   hooks/nvidia-ko/install.nvidia-ko      | 9 ++++++---
>   hooks/nvidia-ko/post-refresh.nvidia-ko | 9 ++++++---
>   hooks/nvidia-ko/remove.nvidia-ko       | 5 ++++-
>   6 files changed, 30 insertions(+), 13 deletions(-)
> 

Applied to canonical-kernel-snaps/main. Thanks.

-Stefan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xE8675DEECBEECEA3.asc
Type: application/pgp-keys
Size: 47863 bytes
Desc: OpenPGP public key
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20250703/f6ab76dd/attachment-0001.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/kernel-team/attachments/20250703/f6ab76dd/attachment-0001.sig>


More information about the kernel-team mailing list