Backported rename of GENHD_FL_NO_PART_SCAN to GENHD_FL_NO_PART breaks existing modules

Bug #2053101 reported by Tim
22
This bug affects 4 people
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Won't Fix
High
Unassigned
Jammy
Won't Fix
High
Unassigned

Bug Description

3rd party kernel modules for Ubuntu 20.04 break due to the recently backported change of renaming GENHD_FL_NO_PART_SCAN to GENHD_FL_NO_PART

linux-gcp-5.15-headers-5.15.0-1049 still uses GENHD_FL_NO_PART_SCAN which the 3rd party kernel modules use, while linux-gcp-5.15-headers-5.15.0-1051 has brought the rename to GENHD_FL_NO_PART in. This is a breaking change and should not have been backported. The 3rd party modules have been updated for newer kernels on 22.04, but can't be updated on 20.04 with this breaking change.

$ grep GENHD_FL_NO_PART /usr/src/linux-gcp-5.15-headers-5.15.0-1049/include/linux/genhd.h /usr/src/linux-gcp-5.15-headers-5.15.0-1051/include/linux/genhd.h
/usr/src/linux-gcp-5.15-headers-5.15.0-1049/include/linux/genhd.h: * ``GENHD_FL_NO_PART_SCAN`` (0x0200): partition scanning is disabled.
/usr/src/linux-gcp-5.15-headers-5.15.0-1049/include/linux/genhd.h: * ``GENHD_FL_NO_PART_SCAN``.
/usr/src/linux-gcp-5.15-headers-5.15.0-1049/include/linux/genhd.h:#define GENHD_FL_NO_PART_SCAN 0x0200
/usr/src/linux-gcp-5.15-headers-5.15.0-1049/include/linux/genhd.h: !(disk->flags & GENHD_FL_NO_PART_SCAN);

/usr/src/linux-gcp-5.15-headers-5.15.0-1051/include/linux/genhd.h: * ``GENHD_FL_NO_PART`` (0x0200): partition support is disabled.
/usr/src/linux-gcp-5.15-headers-5.15.0-1051/include/linux/genhd.h: * ``GENHD_FL_NO_PART``.
/usr/src/linux-gcp-5.15-headers-5.15.0-1051/include/linux/genhd.h:#define GENHD_FL_NO_PART 0x0200
/usr/src/linux-gcp-5.15-headers-5.15.0-1051/include/linux/genhd.h: return disk_max_parts(disk) > 1 && !(disk->flags & GENHD_FL_NO_PART);

$ lsb_release -rd
Description: Ubuntu 20.04.6 LTS
Release: 20.04

$ apt policy linux-image-5.15.0-1051-gcp
linux-image-5.15.0-1051-gcp:
  Installed: 5.15.0-1051.59~20.04.1
  Candidate: 5.15.0-1051.59~20.04.1
  Version table:
 *** 5.15.0-1051.59~20.04.1 500
        500 http://australia-southeast1.gce.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
        100 /var/lib/dpkg/status

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: linux-image-5.15.0-1051-gcp 5.15.0-1051.59~20.04.1
ProcVersionSignature: Ubuntu 5.15.0-1051.59~20.04.1-gcp 5.15.136
Uname: Linux 5.15.0-1051-gcp x86_64
ApportVersion: 2.20.11-0ubuntu27.27
Architecture: amd64
CasperMD5CheckResult: skip
Date: Wed Feb 14 12:07:11 2024
ProcEnviron:
 TERM=screen-256color
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=C.UTF-8
 SHELL=/bin/bash
SourcePackage: linux-signed-gcp-5.15
UpgradeStatus: Upgraded to focal on 2023-05-07 (282 days ago)

Revision history for this message
Tim (timw-suqld) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in linux-signed-gcp-5.15 (Ubuntu):
status: New → Confirmed
Revision history for this message
Campbell Steven (campbell-3) wrote :

Just chiming in to say this is affecting us on 22.04 kernels from 5.15.0-94-generic on. It's causing Veeam's veeamsnap module to not compile any more.

 /var/lib/dkms/veeamsnap/5.0.2.4567/build/snapimage.c: In function ‘snapimage_create’:
 /var/lib/dkms/veeamsnap/5.0.2.4567/build/snapimage.c:923:24: error: ‘GENHD_FL_NO_PART_SCAN’ undeclared (first use in this function); did you mean ‘GENHD_FL_NO_PART’?
   923 | disk->flags |= GENHD_FL_NO_PART_SCAN;
       | ^~~~~~~~~~~~~~~~~~~~~
       | GENHD_FL_NO_PART
 /var/lib/dkms/veeamsnap/5.0.2.4567/build/snapimage.c:923:24: note: each undeclared identifier is reported only once for each function it appears in

We have raised with the vendor (Veeam) but also surprised this change made it into a stable kernel series.

Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

The following commit changed the name of that variable:
99a4e9bce56b block: rename GENHD_FL_NO_PART_SCAN to GENHD_FL_NO_PART

That commit was applied to the gcp kernel via stable updates from Jammy (22.04) version:
5.15.0-93.103

Jammy received it from upstream stable updates via:
c6ce1c5dd327 block: rename GENHD_FL_NO_PART_SCAN to GENHD_FL_NO_PART

That commit was applied to upstream stable in version:
v5.15.132

I'll report this to upstream and see what the suggested fix may be.

Changed in linux-signed-gcp-5.15 (Ubuntu):
importance: Undecided → High
status: Confirmed → In Progress
assignee: nobody → Joseph Salisbury (jsalisbury)
affects: linux-signed-gcp-5.15 (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
assignee: Joseph Salisbury (jsalisbury) → nobody
Changed in linux (Ubuntu Jammy):
status: New → In Progress
importance: Undecided → High
Changed in linux (Ubuntu):
assignee: nobody → Joseph Salisbury (jsalisbury)
Changed in linux (Ubuntu Jammy):
assignee: nobody → Joseph Salisbury (jsalisbury)
tags: added: kernel-key
no longer affects: linux-realtime (Ubuntu Jammy)
Changed in linux-realtime (Ubuntu):
importance: Undecided → High
status: New → In Progress
status: In Progress → Triaged
Changed in linux-gcp (Ubuntu):
status: New → Triaged
importance: Undecided → High
Changed in linux (Ubuntu):
assignee: Joseph Salisbury (jsalisbury) → nobody
Changed in linux (Ubuntu Jammy):
assignee: Joseph Salisbury (jsalisbury) → nobody
no longer affects: linux-gcp (Ubuntu)
no longer affects: linux-realtime (Ubuntu)
Changed in linux (Ubuntu Jammy):
status: In Progress → Won't Fix
Changed in linux (Ubuntu):
status: In Progress → Won't Fix
Revision history for this message
Joseph Salisbury (jsalisbury) wrote :

As a general rule, the kernel internal interface changes all the time and it cannot take into account out of tree module.

It's the responsibility of the maintainers of these modules to keep up with upstream changes.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.