]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC 332735:
authorjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 30 Apr 2018 20:29:28 +0000 (20:29 +0000)
committerjhb <jhb@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 30 Apr 2018 20:29:28 +0000 (20:29 +0000)
commitec4af9bd2739c3e515513aaa18ad690d738bf1fb
tree3500f094d0ca19c2d001c449d85e1dc04a206a0d
parent5a373a1db62b074cbcc1100bcc4a2e19dd8fa1a7
MFC 332735:
Fix two off-by-one errors when allocating MSI and MSI-X interrupts.

x86 enforces an (arbitray) limit on the number of available MSI and
MSI-X interrupts to simplify code (in particular, interrupt_source[]
is statically sized).  This means that an attempt to allocate an MSI
vector needs to fail if it would go beyond the limit, but the checks
for exceeding the limit had an off-by-one error.  In the case of MSI-X
which allocates interrupts one at a time this meant that IRQ 768 kept
getting handed out multiple times for msix_alloc() instead of failing
because all MSI IRQs were in use.

git-svn-id: svn://svn.freebsd.org/base/stable/10@333126 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/x86/x86/msi.c