net: qrtr: Change port allocation to use cyclic idr
There is a race for clients that open sockets before the control port
is bound. If a client gets an idr that was allocated before the control
port is bound, there is a chance the previous address owner sent lookup
packets to the control port. The new address owner will get residual
responses to this the lookup packets.
Change the idr_alloc to idr_alloc_cyclic so new idr's are allocated
instead of trying to reuse the freed idrs.
Change-Id: Ie1bda7a818309503f80542e739bac646327296f7
Signed-off-by:
Chris Lew <clew@codeaurora.org>
Loading
Please register or sign in to comment