aboutsummaryrefslogtreecommitdiffstats
path: root/src/common
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-02-24 13:51:30 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2014-02-24 13:51:30 +0100
commit5030972316892019a62423dfb9bd26ad158cda5a (patch)
treecc8465c804a68757db2cfbe14a19240d6dcd94eb /src/common
parentfcd4026e7b48942e31d0efaa7f091e4ae50a8e1a (diff)
pcu: Avoid crash when closing the PCU socket
When closing the PCU socket all channels will be closed. In that case the LAPDm structures might not have been allocated. Mark the channel as LCHAN_REL_ACT_PCU to avoid going through the RSL code for sending the message. This avoids a crash when "gprs none" is selected but one still configures a PDCH and then connects/disconnects the pcu. #0 llist_del (entry=0x0) at ../include/osmocom/core/linuxlist.h:119 #1 msgb_dequeue (queue=0x400bbc58) at msgb.c:102 #2 0x40110d28 in lapd_dl_flush_tx (dl=0x400bbba0) at lapd_core.c:173 #3 0x40112cb4 in lapd_dl_reset (dl=0x400bbba0) at lapd_core.c:307 #4 0x40112d00 in lapd_dl_exit (dl=0x400bbba0) at lapd_core.c:321 #5 0x40115d80 in lapdm_entity_exit (le=<optimized out>) at lapdm.c:169 #6 0x40115d9c in lapdm_channel_exit (lc=0x400bbb94) at lapdm.c:180 #7 0x0001a334 in rsl_tx_rf_rel_ack (lchan=0x400bbb00) at rsl.c:505 #8 0x0000e908 in lchan_deactivate_sapis (lchan=0x400bbb00) at oml.c:1427 #9 sapi_queue_exeute (lchan=0x400bbb00) at oml.c:547 #10 0x0000ead0 in sapi_queue_send (lchan=<optimized out>) at oml.c:571 #11 queue_sapi_command (lchan=<optimized out>, cmd=<optimized out>) at oml.c:609 #12 queue_sapi_command (lchan=0x400bbb00, cmd=<optimized out>) at oml.c:601 #13 0x0000faf0 in enqueue_rel_marker (lchan=0x400bbb00) at oml.c:1440 #14 lchan_deactivate (lchan=0x400bbb00) at oml.c:1447 #15 0x0001004c in bts_model_rsl_chan_rel (lchan=<optimized out>) at oml.c:1647 #16 0x0001de30 in pcu_sock_close (state=0x62788) at pcu_sock.c:654 #17 0x0001e150 in pcu_sock_read (bfd=0x627a8) at pcu_sock.c:698 #18 pcu_sock_cb (bfd=0x627a8, flags=1) at pcu_sock.c:755
Diffstat (limited to 'src/common')
-rw-r--r--src/common/pcu_sock.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 3fef9b12..bd89da2f 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -650,8 +650,10 @@ static void pcu_sock_close(struct pcu_sock_state *state)
for (j = 0; j < 8; j++) {
ts = &trx->ts[j];
if (ts->mo.nm_state.operational == NM_OPSTATE_ENABLED
- && ts->pchan == GSM_PCHAN_PDCH)
+ && ts->pchan == GSM_PCHAN_PDCH) {
+ ts->lchan->rel_act_kind = LCHAN_REL_ACT_PCU;
bts_model_rsl_chan_rel(ts->lchan);
+ }
}
}