Skip to content
Commit 711c71a0 authored by Akinobu Mita's avatar Akinobu Mita Committed by David S. Miller
Browse files

sparc: fix size argument to find_next_zero_bit()



iommu_alloc_ctx() finds a zero bit in iommu->ctx_bitmap.  It starts
searching from iommu->ctx_lowest_free to the end of the bitmap.
But the size argument to find_next_zero_bit() in iommu_alloc_ctx()
is wrong.  It should be the bitmap size, not the maximum size to
search from the offset argument.

Fortunately iommu->ctx_lowest_free is almost unused and it will not
be more than 1. So the bug wasted only 1-bit at the end of
iommu->ctx_bitmap.

Signed-off-by: default avatarAkinobu Mita <akinobu.mita@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: sparclinux@vger.kernel.org
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e637804c
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment