[MERGED] osmo-bsc[master]: paging: paging_flush_bts: be sure pending_requests is inital...

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Wed Dec 13 20:19:52 UTC 2017


Harald Welte has submitted this change and it was merged.

Change subject: paging: paging_flush_bts: be sure pending_requests is initalized
......................................................................


paging: paging_flush_bts: be sure pending_requests is initalized

The BSSMAP reset causes the paging requests to be flushed. When
this happens right after startup then calling paging_flush_bts()
may be called when the list bts->paging.pending_requests is not
yet initalized, which causes a segfault.

Call paging_init_if_needed() to be sure that the list is
inizalized (like the other functions also do)

Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc
---
M src/libbsc/paging.c
1 file changed, 2 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved
  Jenkins Builder: Verified



diff --git a/src/libbsc/paging.c b/src/libbsc/paging.c
index d657bd3..42ecdcf 100644
--- a/src/libbsc/paging.c
+++ b/src/libbsc/paging.c
@@ -477,6 +477,8 @@
 {
 	struct gsm_paging_request *req, *req2;
 
+	paging_init_if_needed(bts);
+
 	llist_for_each_entry_safe(req, req2, &bts->paging.pending_requests, entry) {
 		if (msc && req->msc != msc)
 			continue;

-- 
To view, visit https://gerrit.osmocom.org/5321
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I42ddbfdec6f9d74d858ad13cc38b5b64061d08dc
Gerrit-PatchSet: 2
Gerrit-Project: osmo-bsc
Gerrit-Branch: master
Gerrit-Owner: dexter <pmaier at sysmocom.de>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Jenkins Builder



More information about the gerrit-log mailing list