mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
net: qrtr: Change port insertion to atomic
The xa_insert function cannot be called with GFP_ATOMIC if the context does not have preemption disabled. There was a change to make the port insertion structure synchronize with rcu and therefore was no longer protected with spinlocks. Using RCUs lead to a performance degredation so spinlock synchronization was reinstated. Now that port insertion happens within a spinlock, GFP_KERNEL cannot be used. Change-Id: Ib09addbcaa7802bf80ddb953901e07e43c0f376e Signed-off-by: Tony Truong <quic_truong@quicinc.com>
This commit is contained in:
parent
7c38a3fd23
commit
8fb044e2d6
|
|
@ -1577,9 +1577,9 @@ static int qrtr_port_assign(struct qrtr_sock *ipc, int *port)
|
|||
in_egroup_p(GLOBAL_ROOT_GID))) {
|
||||
rc = -EACCES;
|
||||
} else if (*port == QRTR_PORT_CTRL) {
|
||||
rc = xa_insert(&qrtr_ports, 0, ipc, GFP_KERNEL);
|
||||
rc = xa_insert(&qrtr_ports, 0, ipc, GFP_ATOMIC);
|
||||
} else {
|
||||
rc = xa_insert(&qrtr_ports, *port, ipc, GFP_KERNEL);
|
||||
rc = xa_insert(&qrtr_ports, *port, ipc, GFP_ATOMIC);
|
||||
}
|
||||
|
||||
if (rc == -EBUSY)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user