Re: [PATCH] net: qrtr: fix usage of idr in port assignment to socket

2020-08-14 Thread David Miller
From: Necip Fazil Yildiran Date: Fri, 14 Aug 2020 10:10:00 + > diff --git a/net/qrtr/qrtr.c b/net/qrtr/qrtr.c > index b4c0db0b7d31..52d0707df776 100644 > --- a/net/qrtr/qrtr.c > +++ b/net/qrtr/qrtr.c > @@ -693,22 +693,24 @@ static void qrtr_port_remove(struct qrtr_sock *ipc) > static int qrt

[PATCH] net: qrtr: fix usage of idr in port assignment to socket

2020-08-14 Thread Necip Fazil Yildiran
From: Necip Fazil Yildiran Passing large uint32 sockaddr_qrtr.port numbers for port allocation triggers a warning within idr_alloc() since the port number is cast to int, and thus interpreted as a negative number. This leads to the rejection of such valid port numbers in qrtr_port_assign() as idr