]> git.baikalelectronics.ru Git - kernel.git/commit
virtio-mmio: Reject invalid IRQ 0 command line argument
authorBjorn Helgaas <bhelgaas@google.com>
Wed, 1 Jul 2020 20:53:15 +0000 (15:53 -0500)
committerBjorn Helgaas <bhelgaas@google.com>
Wed, 22 Jul 2020 15:31:45 +0000 (10:31 -0500)
commitda2e1c8b71ad9aec3fa8a5e7202ac92f84cf3998
tree6ae1b6949d83be93c8847acf130f0178fa750c76
parent4fee87dd09cce7d3d6ef7e5cd4d4ccd8cd225898
virtio-mmio: Reject invalid IRQ 0 command line argument

The "virtio_mmio.device=" command line argument allows a user to specify
the size, address, and IRQ of a virtio device.  Previously the only
requirement for the IRQ was that it be an unsigned integer.

Zero is an unsigned integer but an invalid IRQ number, and after
77849ba8d8719 ("driver core: platform: Clarify that IRQ 0 is invalid"),
attempts to use IRQ 0 cause warnings.

If the user specifies IRQ 0, return failure instead of registering a device
with IRQ 0.

Fixes: 77849ba8d8719 ("driver core: platform: Clarify that IRQ 0 is invalid")
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_mmio.c