Remove duplication of devm_pwmchip_add function definition

Bug #2039542 reported by Roxana Nicolescu
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Invalid
Undecided
Unassigned
Lunar
Fix Released
Medium
Roxana Nicolescu
linux-kvm (Ubuntu)
New
Undecided
Unassigned
Lunar
Fix Released
Undecided
Roxana Nicolescu

Bug Description

SRU Justification:

[Impact]

* Upstream commit 88da4e8113110d5f4ebdd2f8cd0899e300cd1954 "pwm: Add a stub for devm_pwmchip_add()", was applied the second time during the latest upstream patchset (#LP: 2037005) for cycle 2023.10.02.
* `git am` did not detect that the changes were applied, leading to the same function definition being duplicated.
* This was not caught when the main kernel was built because this code is under CONFIG_PWM=n. The main kernel and pretty much every kernel apart from linux-kvm, has CONFIG_PWM=y.
* The problem was caught when lunar:linux-kvm was cranked and build failed with the following error:

```
In file included from /build/lunar/drivers/acpi/acpi_lpss.c:23:
/build/lunar/include/linux/pwm.h:486:19: error: redefinition of 'devm_pwmchip_add'
  486 | static inline int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip)
      | ^~~~~~~~~~~~~~~~
/build/lunar/include/linux/pwm.h:481:19: note: previous definition of 'devm_pwmchip_add' with type 'int(struct device *, struct pwm_chip *)'
  481 | static inline int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip)
      | ^~~~~~~~~~~~~~~~

```

[Fix]
* Revert the commit.
* Because this affects only linux:kvm, it is necessary to apply this fix for lunar:linux-kvm for cycle 2023.10.02, but the main kernel can wait for the next cycle.

[Test plan]
* Since linux-kvm was the only kernel that had this issue, I applied the patch to kvm after I rebased the latest changes from the parent and did a build test.
* I also did a build test for linux:main just to make sure

[Where problems could occur]
* This change is pretty non-invasive, so nowhere

Changed in linux (Ubuntu):
status: New → Invalid
Changed in linux-kvm (Ubuntu Lunar):
status: New → Invalid
Changed in linux (Ubuntu Lunar):
status: New → In Progress
Changed in linux-kvm (Ubuntu Lunar):
status: Invalid → In Progress
Changed in linux (Ubuntu Lunar):
assignee: nobody → Roxana Nicolescu (roxanan)
Changed in linux-kvm (Ubuntu Lunar):
assignee: nobody → Roxana Nicolescu (roxanan)
tags: added: sru-20231002
description: updated
description: updated
Changed in linux (Ubuntu Lunar):
status: In Progress → Fix Committed
Changed in linux-kvm (Ubuntu Lunar):
status: In Progress → Fix Committed
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-kvm/6.2.0-1016.16 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lunar-linux-kvm' to 'verification-done-lunar-linux-kvm'. If the problem still exists, change the tag 'verification-needed-lunar-linux-kvm' to 'verification-failed-lunar-linux-kvm'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-lunar-linux-kvm-v2 verification-needed-lunar-linux-kvm
Revision history for this message
Roxana Nicolescu (roxanan) wrote :

The fact that the kernel built and it's in -proposed means the bug is verified.

tags: added: verification-done-lunar-linux-kvm
removed: verification-needed-lunar-linux-kvm
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (104.4 KiB)

This bug was fixed in the package linux-kvm - 6.2.0-1016.16

---------------
linux-kvm (6.2.0-1016.16) lunar; urgency=medium

  * lunar/linux-kvm: 6.2.0-1016.16 -proposed tracker (LP: #2038065)

  * Remove duplication of devm_pwmchip_add function definition (LP: #2039542)
    - Revert "pwm: Add a stub for devm_pwmchip_add()"

  [ Ubuntu: 6.2.0-36.37 ]

  * lunar/linux: 6.2.0-36.37 -proposed tracker (LP: #2038076)
  * Regression for ubuntu_bpf test build caused by upstream bdeeed3498c7
    (LP: #2035181)
    - selftests/bpf: fix static assert compilation issue for test_cls_*.c
  * CVE-2023-4244
    - netfilter: nf_tables: don't skip expired elements during walk
    - netfilter: nf_tables: adapt set backend to use GC transaction API
    - netfilter: nft_set_hash: mark set element as dead when deleting from packet
      path
    - netfilter: nf_tables: GC transaction API to avoid race with control plane
    - netfilter: nf_tables: don't fail inserts if duplicate has expired
    - netfilter: nf_tables: fix kdoc warnings after gc rework
    - netfilter: nf_tables: fix GC transaction races with netns and netlink event
      exit path
    - netfilter: nf_tables: GC transaction race with netns dismantle
    - netfilter: nf_tables: GC transaction race with abort path
    - netfilter: nf_tables: use correct lock to protect gc_list
    - netfilter: nf_tables: defer gc run if previous batch is still pending
    - netfilter: nft_dynset: disallow object maps
    - netfilter: nft_set_rbtree: skip sync GC for new elements in this transaction
  * CVE-2023-4563
    - netfilter: nf_tables: remove busy mark and gc batch API
  * CVE-2023-42756
    - netfilter: ipset: Fix race between IPSET_CMD_CREATE and IPSET_CMD_SWAP
  * CVE-2023-4623
    - net/sched: sch_hfsc: Ensure inner classes have fsc curve
  * Fix unstable audio at low levels on Thinkpad P1G4 (LP: #2037077)
    - ALSA: hda/realtek - ALC287 I2S speaker platform support
  * Lunar update: upstream stable patchset 2023-09-21 (LP: #2037005)
    - Upstream stable to v6.1.41, v6.4.6
    - io_uring: treat -EAGAIN for REQ_F_NOWAIT as final for io-wq
    - ALSA: hda/realtek - remove 3k pull low procedure
    - ALSA: hda/realtek: Add quirk for Clevo NS70AU
    - ALSA: hda/realtek: Enable Mute LED on HP Laptop 15s-eq2xxx
    - maple_tree: set the node limit when creating a new root node
    - maple_tree: fix node allocation testing on 32 bit
    - keys: Fix linking a duplicate key to a keyring's assoc_array
    - perf probe: Add test for regression introduced by switch to
      die_get_decl_file()
    - btrfs: fix warning when putting transaction with qgroups enabled after abort
    - fuse: revalidate: don't invalidate if interrupted
    - fuse: Apply flags2 only when userspace set the FUSE_INIT_EXT
    - btrfs: set_page_extent_mapped after read_folio in btrfs_cont_expand
    - btrfs: zoned: fix memory leak after finding block group with super blocks
    - fuse: ioctl: translate ENOSYS in outarg
    - btrfs: fix race between balance and cancel/pause
    - selftests: tc: set timeout to 15 minutes
    - selftests: tc: add 'ct' action kconfig dep
    - regmap: Drop initial version of maximum transfer length fixes
    -...

Changed in linux-kvm (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux/6.2.0-38.39 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lunar-linux' to 'verification-done-lunar-linux'. If the problem still exists, change the tag 'verification-needed-lunar-linux' to 'verification-failed-lunar-linux'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-lunar-linux-v2 verification-needed-lunar-linux
Revision history for this message
Stefan Bader (smb) wrote :

This is not verifiable in the main kernel since it affected stub code which is not in use with that config. The only kernel running into it was linux-kvm. This builds now and double checked that this was done by the change:

@@ -483,11 +483,6 @@ static inline int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip)
        return -EINVAL;
 }

-static inline int devm_pwmchip_add(struct device *dev, struct pwm_chip *chip)
-{
- return -EINVAL;
-}

Note that the function name deleted is the same as the name of the function directly before (as the @@ hint shows).

Changed in linux (Ubuntu Lunar):
importance: Undecided → Medium
Stefan Bader (smb)
tags: added: verification-done-lunar-linux
removed: verification-needed-lunar-linux
Revision history for this message
Launchpad Janitor (janitor) wrote :
Download full text (39.0 KiB)

This bug was fixed in the package linux - 6.2.0-39.40

---------------
linux (6.2.0-39.40) lunar; urgency=medium

  * lunar/linux: 6.2.0-39.40 -proposed tracker (LP: #2043451)

  * USB bus error after upgrading to proposed kernel on lunar and jammy
    (LP: #2043197)
    - USB: core: Fix oversight in SuperSpeed initialization

  * Include cifs.ko in linux-modules package (LP: #2042546)
    - [Packaging] Replace fs/cifs with fs/smb/client in inclusion list

linux (6.2.0-38.39) lunar; urgency=medium

  * lunar/linux: 6.2.0-38.39 -proposed tracker (LP: #2041557)

  * CVE-2023-25775
    - RDMA/irdma: Prevent zero-length STAG registration

  * CVE-2023-5345
    - fs/smb/client: Reset password pointer to NULL

  * CVE-2023-39189
    - netfilter: nfnetlink_osf: avoid OOB read

  * SMC stats: Wrong bucket calculation for payload of exactly 4096 bytes
    (LP: #2039575)
    - net/smc: Fix pos miscalculation in statistics

  * [SRU][J/L/M] UBUNTU: [Packaging] Make WWAN driver a loadable module
    (LP: #2033406)
    - [Packaging] Make WWAN driver loadable modules

  * CVE-2023-45871
    - igb: set max size RX buffer when store bad packet is enabled

  * CVE-2023-39193
    - netfilter: xt_sctp: validate the flag_info count

  * CVE-2023-39192
    - netfilter: xt_u32: validate user space input

  * CVE-2023-31085
    - ubi: Refuse attaching if mtd's erasesize is 0

  * CVE-2023-5717
    - perf: Disallow mis-matched inherited group reads

  * CVE-2023-5178
    - nvmet-tcp: Fix a possible UAF in queue intialization setup

  * CVE-2023-5158
    - vringh: don't use vringh_kiov_advance() in vringh_iov_xfer()

  * CVE-2023-5090
    - x86: KVM: SVM: always update the x2avic msr interception

  * usbip: error: failed to open /usr/share/hwdata//usb.ids (LP: #2039439)
    - [Packaging] Make linux-tools-common depend on hwdata

  * Unable to use nvme drive to install Ubuntu 23.10 (LP: #2040157)
    - misc: rtsx: Fix some platforms can not boot and move the l1ss judgment to
      probe

  * Lunar update: upstream stable patchset 2023-10-19 (LP: #2039884)
    - ACPI: thermal: Drop nocrt parameter
    - module: Expose module_init_layout_section()
    - arm64: module-plts: inline linux/moduleloader.h
    - arm64: module: Use module_init_layout_section() to spot init sections
    - ARM: module: Use module_init_layout_section() to spot init sections
    - lockdep: fix static memory detection even more
    - parisc: Cleanup mmap implementation regarding color alignment
    - parisc: sys_parisc: parisc_personality() is called from asm code
    - io_uring/parisc: Adjust pgoff in io_uring mmap() for parisc
    - kallsyms: Fix kallsyms_selftest failure
    - module/decompress: use vmalloc() for zstd decompression workspace
    - Upstream stable to v6.1.51, v6.4.14
    - erofs: ensure that the post-EOF tails are all zeroed
    - ksmbd: fix wrong DataOffset validation of create context
    - ksmbd: fix slub overflow in ksmbd_decode_ntlmssp_auth_blob()
    - ksmbd: replace one-element array with flex-array member in struct
      smb2_ea_info
    - ksmbd: reduce descriptor size if remaining bytes is less than request size
    - ARM: pxa: remove use of symbol_get()
    - mmc: au1x...

Changed in linux (Ubuntu Lunar):
status: Fix Committed → Fix Released
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-lowlatency-hwe-6.2/6.2.0-1018.18~22.04.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy-linux-lowlatency-hwe-6.2' to 'verification-done-jammy-linux-lowlatency-hwe-6.2'. If the problem still exists, change the tag 'verification-needed-jammy-linux-lowlatency-hwe-6.2' to 'verification-failed-jammy-linux-lowlatency-hwe-6.2'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-lowlatency-hwe-6.2-v2 verification-needed-jammy-linux-lowlatency-hwe-6.2
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-gcp/6.2.0-1020.22 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lunar-linux-gcp' to 'verification-done-lunar-linux-gcp'. If the problem still exists, change the tag 'verification-needed-lunar-linux-gcp' to 'verification-failed-lunar-linux-gcp'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-lunar-linux-gcp-v2 verification-needed-lunar-linux-gcp
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-aws/6.2.0-1017.17 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lunar-linux-aws' to 'verification-done-lunar-linux-aws'. If the problem still exists, change the tag 'verification-needed-lunar-linux-aws' to 'verification-failed-lunar-linux-aws'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-lunar-linux-aws-v2 verification-needed-lunar-linux-aws
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-azure/6.2.0-1018.18 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lunar-linux-azure' to 'verification-done-lunar-linux-azure'. If the problem still exists, change the tag 'verification-needed-lunar-linux-azure' to 'verification-failed-lunar-linux-azure'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-lunar-linux-azure-v2 verification-needed-lunar-linux-azure
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-starfive/6.2.0-1010.11 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lunar-linux-starfive' to 'verification-done-lunar-linux-starfive'. If the problem still exists, change the tag 'verification-needed-lunar-linux-starfive' to 'verification-failed-lunar-linux-starfive'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-lunar-linux-starfive-v2 verification-needed-lunar-linux-starfive
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-hwe-6.2/6.2.0-39.40~22.04.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy-linux-hwe-6.2' to 'verification-done-jammy-linux-hwe-6.2'. If the problem still exists, change the tag 'verification-needed-jammy-linux-hwe-6.2' to 'verification-failed-jammy-linux-hwe-6.2'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-hwe-6.2-v2 verification-needed-jammy-linux-hwe-6.2
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-riscv/6.2.0-39.40.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-lunar-linux-riscv' to 'verification-done-lunar-linux-riscv'. If the problem still exists, change the tag 'verification-needed-lunar-linux-riscv' to 'verification-failed-lunar-linux-riscv'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-lunar-linux-riscv-v2 verification-needed-lunar-linux-riscv
Revision history for this message
Ubuntu Kernel Bot (ubuntu-kernel-bot) wrote :

This bug is awaiting verification that the linux-gcp-6.2/6.2.0-1021.23~22.04.1 kernel in -proposed solves the problem. Please test the kernel and update this bug with the results. If the problem is solved, change the tag 'verification-needed-jammy-linux-gcp-6.2' to 'verification-done-jammy-linux-gcp-6.2'. If the problem still exists, change the tag 'verification-needed-jammy-linux-gcp-6.2' to 'verification-failed-jammy-linux-gcp-6.2'.

If verification is not done by 5 working days from today, this fix will be dropped from the source code, and this bug will be closed.

See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you!

tags: added: kernel-spammed-jammy-linux-gcp-6.2-v2 verification-needed-jammy-linux-gcp-6.2
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.