aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-10-19 16:36:50 +0200
committerlaforge <laforge@osmocom.org>2020-10-19 15:06:55 +0000
commitff5b59a821f3211f422b676e89b9c4508134c839 (patch)
treed08587df0a7521d5eb265163eb8d0ed809c7dd32
parentbe2330fde4b0507cf53c8e893fb1cec51bd049ec (diff)
Log error if pdp ctx is freed while holding an active timer
-rw-r--r--src/sgsn/gprs_sgsn.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/sgsn/gprs_sgsn.c b/src/sgsn/gprs_sgsn.c
index cb2c0fc2..0b7c21e9 100644
--- a/src/sgsn/gprs_sgsn.c
+++ b/src/sgsn/gprs_sgsn.c
@@ -511,6 +511,11 @@ void sgsn_pdp_ctx_free(struct sgsn_pdp_ctx *pdp)
sig_data.pdp = pdp;
osmo_signal_dispatch(SS_SGSN, S_SGSN_PDP_FREE, &sig_data);
+ if (osmo_timer_pending(&pdp->timer)) {
+ LOGPDPCTXP(LOGL_ERROR, pdp, "Freeing PDP ctx with timer %u pending\n", pdp->T);
+ osmo_timer_del(&pdp->timer);
+ }
+
rate_ctr_group_free(pdp->ctrg);
if (pdp->mm)
llist_del(&pdp->list);