diff options
| author | Chris Lew <[email protected]> | 2020-05-28 23:05:26 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2020-05-31 04:43:13 +0000 |
| commit | c6e08d6251f342090a9b9abccbf26b19bcb54d17 (patch) | |
| tree | 637c5291533ba491ca10187afee7d559924bc413 /scripts/mod/file2alias.c | |
| parent | Merge branch 'mptcp-a-bunch-of-fixes' (diff) | |
| download | kernel-c6e08d6251f342090a9b9abccbf26b19bcb54d17.tar.gz kernel-c6e08d6251f342090a9b9abccbf26b19bcb54d17.zip | |
net: qrtr: Allocate workqueue before kernel_bind
A null pointer dereference in qrtr_ns_data_ready() is seen if a client
opens a qrtr socket before qrtr_ns_init() can bind to the control port.
When the control port is bound, the ENETRESET error will be broadcasted
and clients will close their sockets. This results in DEL_CLIENT
packets being sent to the ns and qrtr_ns_data_ready() being called
without the workqueue being allocated.
Allocate the workqueue before setting sk_data_ready and binding to the
control port. This ensures that the work and workqueue structs are
allocated and initialized before qrtr_ns_data_ready can be called.
Fixes: 0c2204a4ad71 ("net: qrtr: Migrate nameservice to kernel from userspace")
Signed-off-by: Chris Lew <[email protected]>
Reviewed-by: Bjorn Andersson <[email protected]>
Reviewed-by: Manivannan Sadhasivam <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'scripts/mod/file2alias.c')
0 files changed, 0 insertions, 0 deletions
