[Hyper-V] linux-azure: PCI: hv: Do not sleep in compose_msi_msg()

Bug #1747543 reported by Joshua R. Poulson on 2018-02-05
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux-azure (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Marcelo Cerri
linux-azure-edge (Ubuntu)
Undecided
Unassigned
Xenial
Undecided
Marcelo Cerri

Bug Description

Part of the transparent SR-IOV series appears to be missing from 4.13.

PCI: hv: Do not sleep in compose_msi_msg()

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=80bfeeb9dd6b54ac108c884c792f0fc7d4912bee

The setup of MSI with Hyper-V host was sleeping with locks held. This
error is reported when doing SR-IOV hotplug with kernel built with lockdep:

    BUG: sleeping function called from invalid context at kernel/sched/completion.c:93
    in_atomic(): 1, irqs_disabled(): 1, pid: 1405, name: ip
    3 locks held by ip/1405:
   #0: (rtnl_mutex){+.+.+.}, at: [<ffffffff976b10bb>] rtnetlink_rcv+0x1b/0x40
   #1: (&desc->request_mutex){+.+...}, at: [<ffffffff970ddd33>] __setup_irq+0xb3/0x720
   #2: (&irq_desc_lock_class){-.-...}, at: [<ffffffff970ddd65>] __setup_irq+0xe5/0x720
   irq event stamp: 3476
   hardirqs last enabled at (3475): [<ffffffff971b3005>] get_page_from_freelist+0x225/0xc90
   hardirqs last disabled at (3476): [<ffffffff978024e7>] _raw_spin_lock_irqsave+0x27/0x90
   softirqs last enabled at (2446): [<ffffffffc05ef0b0>] ixgbevf_configure+0x380/0x7c0 [ixgbevf]
   softirqs last disabled at (2444): [<ffffffffc05ef08d>] ixgbevf_configure+0x35d/0x7c0 [ixgbevf]

The workaround is to poll for host response instead of blocking on
completion.

Please add this to linux-azure on 4.13.

Joshua R. Poulson (jrp) on 2018-02-05
Changed in linux-azure (Ubuntu):
status: New → Confirmed
Marcelo Cerri (mhcerri) on 2018-02-06
Changed in linux-azure (Ubuntu Xenial):
assignee: nobody → Marcelo Cerri (mhcerri)
status: New → In Progress
Changed in linux-azure-edge (Ubuntu Xenial):
assignee: nobody → Marcelo Cerri (mhcerri)
Marcelo Cerri (mhcerri) on 2018-02-07
Changed in linux-azure (Ubuntu Xenial):
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers