ACK: [SRU][N:linux-bluefield][PATCH v1 0/1] UBUNTU: SAUCE: Fix vfio_pci_core_ioctl compilation issue

Sarah Emery sarah.emery at canonical.com
Tue Oct 28 10:03:46 UTC 2025


On 23/10/2025 16:32, Stav Aviram wrote:
> BugLink: https://bugs.launchpad.net/bugs/2129689
> 
> SRU Justification:
> 
> [IMPACT]
> Compilation failure on x86_64 platform during kernel build with certain compiler configurations. The VFIO_DEVICE_P2P_DMA_BUF case handler in vfio_pci_core_ioctl() violates C language standards by placing a variable declaration immediately after a case label without a compound statement. This causes the error: "a label can only be part of a statement and a declaration is not a statement" at line 1489 of drivers/vfio/pci/vfio_pci_core.c. The issue was introduced during the port of commit 60da28814250 ("vfio/pci: Allow MMIO regions to be exported through dma-buf", buglink https://bugs.launchpad.net/bugs/2126876) from linux-bluefield-5.15 to linux-bluefield-6.8 when the function was refactored from an if-else chain to a switch statement.
> 
> [FIX]
> Add braces around the VFIO_DEVICE_P2P_DMA_BUF case block to create a compound statement. This is a minimal two-line change: adding an opening brace after the case label and a closing brace before the default case. The fix makes the code compliant with C89/C90/C99/C11 standards without altering any logic or functionality.
> 
> [TEST CASE]
> Successfully compiled on linux-bluefield-6.8, master-next branch.
> 
> [Regression Potential]
> Low risk. The change only adds braces to create a proper compound statement scope around existing code.
> 
> Stav Aviram (1):
>    UBUNTU: SAUCE: Fix vfio_pci_core_ioctl compilation issue
> 
>   drivers/vfio/pci/vfio_pci_core.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 

Acked-by: Sarah Emery <sarah.emery at canonical.com>



More information about the kernel-team mailing list