Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ba4b8f2a authored by Subash Abhinov Kasiviswanathan's avatar Subash Abhinov Kasiviswanathan
Browse files

drivers: rmnet_shs: Move PS ind dereg up



QMI rmnet indications are deregistered after wq is cleanup
during shs_exit. This leaves a window where after the shs wq
is cleaned-up that it can be potentially used.

This change moves the qmi_rmnet deregistration before the wq
cleanup removing that window.

CRs-Fixed: 2427399
Change-Id: I979cdc65ea69ee4ec6097fb6d67508ab4253891a
Acked-by: default avatarRaul Martinez <mraul@qti.qualcomm.com>
Signed-off-by: default avatarSubash Abhinov Kasiviswanathan <subashab@codeaurora.org>
parent bc79c266
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -68,6 +68,8 @@ void __exit rmnet_shs_module_exit(void)
	RCU_INIT_POINTER(rmnet_shs_skb_entry, NULL);

	if (rmnet_shs_cfg.rmnet_shs_init_complete) {
		qmi_rmnet_ps_ind_deregister(rmnet_shs_cfg.port,
					    &rmnet_shs_cfg.rmnet_idl_ind_cb);
		rmnet_shs_cancel_table();
		rmnet_shs_rx_wq_exit();
		rmnet_shs_wq_exit();
@@ -109,6 +111,8 @@ static int rmnet_shs_dev_notify_cb(struct notifier_block *nb,
		    !strcmp(dev->name, "rmnet_mhi0"))) &&
		    rmnet_shs_cfg.rmnet_shs_init_complete) {
			RCU_INIT_POINTER(rmnet_shs_skb_entry, NULL);
			qmi_rmnet_ps_ind_deregister(rmnet_shs_cfg.port,
					    &rmnet_shs_cfg.rmnet_idl_ind_cb);
			rmnet_shs_cancel_table();
			rmnet_shs_rx_wq_exit();
			rmnet_shs_wq_exit();
+0 −3
Original line number Diff line number Diff line
@@ -1650,9 +1650,6 @@ void rmnet_shs_assign(struct sk_buff *skb, struct rmnet_port *port)
void rmnet_shs_exit(void)
{
	rmnet_shs_freq_exit();
	qmi_rmnet_ps_ind_deregister(rmnet_shs_cfg.port,
				    &rmnet_shs_cfg.rmnet_idl_ind_cb);

	rmnet_shs_cfg.dl_mrk_ind_cb.dl_hdr_handler = NULL;
	rmnet_shs_cfg.dl_mrk_ind_cb.dl_trl_handler = NULL;
	rmnet_map_dl_ind_deregister(rmnet_shs_cfg.port,