Change in osmo-bsc[master]: coverity: gscon_forget_lchan: squelch forward-null
Neels Hofmeyr has submitted this change and it was merged. ( https://gerrit.osmocom.org/11742 ) Change subject: coverity: gscon_forget_lchan: squelch forward-null .. coverity: gscon_forget_lchan: squelch forward-null conn->fi should actually never be NULL, they are allocated and discarded simultaneously. So check its null from the start and remove some conditions below, to remove the coverity warning. Related: CID 189671 Change-Id: I62354aa998832131c86535f39a29294000114adc --- M src/osmo-bsc/bsc_subscr_conn_fsm.c 1 file changed, 3 insertions(+), 5 deletions(-) Approvals: Pau Espin Pedrol: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 0dd21d9..d2ca03e 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -672,14 +672,12 @@ /* Log for both lchan FSM and conn FSM to ease reading the log in case of problems */ if (detach_label) { - if (conn->fi) - LOGPFSML(conn->fi, LOGL_DEBUG, "conn detaches lchan %s\n", -lchan->fi? osmo_fsm_inst_name(lchan->fi) : gsm_lchan_name(lchan)); + LOGPFSML(conn->fi, LOGL_DEBUG, "conn detaches lchan %s\n", +lchan->fi? osmo_fsm_inst_name(lchan->fi) : gsm_lchan_name(lchan)); if (lchan->fi) LOGPFSML(lchan->fi, LOGL_DEBUG, "conn %s detaches lchan (%s)\n", -conn->fi? osmo_fsm_inst_name(conn->fi) : "(conn without FSM)", -detach_label); +osmo_fsm_inst_name(conn->fi), detach_label); } if (conn->fi->state != ST_CLEARING -- To view, visit https://gerrit.osmocom.org/11742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: I62354aa998832131c86535f39a29294000114adc Gerrit-Change-Number: 11742 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol
Change in osmo-bsc[master]: coverity: gscon_forget_lchan: squelch forward-null
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/11742 ) Change subject: coverity: gscon_forget_lchan: squelch forward-null .. Patch Set 4: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/11742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62354aa998832131c86535f39a29294000114adc Gerrit-Change-Number: 11742 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-Reviewer: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 14 Nov 2018 17:06:10 + Gerrit-HasComments: No Gerrit-HasLabels: Yes
Change in osmo-bsc[master]: coverity: gscon_forget_lchan: squelch forward-null
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/11742 to look at the new patch set (#4). Change subject: coverity: gscon_forget_lchan: squelch forward-null .. coverity: gscon_forget_lchan: squelch forward-null conn->fi should actually never be NULL, they are allocated and discarded simultaneously. So check its null from the start and remove some conditions below, to remove the coverity warning. Related: CID 189671 Change-Id: I62354aa998832131c86535f39a29294000114adc --- M src/osmo-bsc/bsc_subscr_conn_fsm.c 1 file changed, 3 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/42/11742/4 -- To view, visit https://gerrit.osmocom.org/11742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I62354aa998832131c86535f39a29294000114adc Gerrit-Change-Number: 11742 Gerrit-PatchSet: 4 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Pau Espin Pedrol
Change in osmo-bsc[master]: coverity: gscon_forget_lchan: squelch forward-null
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/11742 to look at the new patch set (#3). Change subject: coverity: gscon_forget_lchan: squelch forward-null .. coverity: gscon_forget_lchan: squelch forward-null conn->fi should actually never be NULL, they are allocated and discarded simultaneously. So check its null from the start and remove some conditions below, to remove the coverity warning. Related: CID 189671 Change-Id: I62354aa998832131c86535f39a29294000114adc --- M src/osmo-bsc/bsc_subscr_conn_fsm.c 1 file changed, 3 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/42/11742/3 -- To view, visit https://gerrit.osmocom.org/11742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I62354aa998832131c86535f39a29294000114adc Gerrit-Change-Number: 11742 Gerrit-PatchSet: 3 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Pau Espin Pedrol
Change in osmo-bsc[master]: coverity: gscon_forget_lchan: squelch forward-null
Neels Hofmeyr has posted comments on this change. ( https://gerrit.osmocom.org/11742 ) Change subject: coverity: gscon_forget_lchan: squelch forward-null .. Patch Set 2: (1 comment) https://gerrit.osmocom.org/#/c/11742/1/src/osmo-bsc/bsc_subscr_conn_fsm.c File src/osmo-bsc/bsc_subscr_conn_fsm.c: https://gerrit.osmocom.org/#/c/11742/1/src/osmo-bsc/bsc_subscr_conn_fsm.c@655 PS1, Line 655: if (!conn || !conn->fi) > Do we really then need this check at all if they are allocated and removed at > the same time? "if (!c […] Right, if no code checks conn->fi then coverity won't see a problem. -- To view, visit https://gerrit.osmocom.org/11742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62354aa998832131c86535f39a29294000114adc Gerrit-Change-Number: 11742 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (102) Gerrit-Reviewer: Neels Hofmeyr Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Wed, 14 Nov 2018 16:24:44 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-bsc[master]: coverity: gscon_forget_lchan: squelch forward-null
Hello Jenkins Builder, I'd like you to reexamine a change. Please visit https://gerrit.osmocom.org/11742 to look at the new patch set (#2). Change subject: coverity: gscon_forget_lchan: squelch forward-null .. coverity: gscon_forget_lchan: squelch forward-null conn->fi should actually never be NULL, they are allocated and discarded simultaneously. So check its null from the start and remove some conditions below, to remove the coverity warning. Related: CID 189671 Change-Id: I62354aa998832131c86535f39a29294000114adc --- M src/osmo-bsc/bsc_subscr_conn_fsm.c 1 file changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/42/11742/2 -- To view, visit https://gerrit.osmocom.org/11742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newpatchset Gerrit-Change-Id: I62354aa998832131c86535f39a29294000114adc Gerrit-Change-Number: 11742 Gerrit-PatchSet: 2 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (102) Gerrit-CC: Pau Espin Pedrol
Change in osmo-bsc[master]: coverity: gscon_forget_lchan: squelch forward-null
Pau Espin Pedrol has posted comments on this change. ( https://gerrit.osmocom.org/11742 ) Change subject: coverity: gscon_forget_lchan: squelch forward-null .. Patch Set 1: (1 comment) https://gerrit.osmocom.org/#/c/11742/1/src/osmo-bsc/bsc_subscr_conn_fsm.c File src/osmo-bsc/bsc_subscr_conn_fsm.c: https://gerrit.osmocom.org/#/c/11742/1/src/osmo-bsc/bsc_subscr_conn_fsm.c@655 PS1, Line 655: if (!conn || !conn->fi) Do we really then need this check at all if they are allocated and removed at the same time? "if (!conn)" should be enough right? -- To view, visit https://gerrit.osmocom.org/11742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I62354aa998832131c86535f39a29294000114adc Gerrit-Change-Number: 11742 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr Gerrit-Reviewer: Jenkins Builder (102) Gerrit-CC: Pau Espin Pedrol Gerrit-Comment-Date: Mon, 12 Nov 2018 16:36:03 + Gerrit-HasComments: Yes Gerrit-HasLabels: No
Change in osmo-bsc[master]: coverity: gscon_forget_lchan: squelch forward-null
Neels Hofmeyr has uploaded this change for review. ( https://gerrit.osmocom.org/11742 Change subject: coverity: gscon_forget_lchan: squelch forward-null .. coverity: gscon_forget_lchan: squelch forward-null conn->fi should actually never be NULL, they are allocated and discarded simultaneously. So check its null from the start and remove some conditions below, to remove the coverity warning. The warning was introduced in recent 946d1fb5c7f4a593567b407222c9235f8fac7a59 Related: CID 189671 Change-Id: I62354aa998832131c86535f39a29294000114adc --- M src/osmo-bsc/bsc_subscr_conn_fsm.c 1 file changed, 4 insertions(+), 5 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/42/11742/1 diff --git a/src/osmo-bsc/bsc_subscr_conn_fsm.c b/src/osmo-bsc/bsc_subscr_conn_fsm.c index 4d6521f..3a4ae7e 100644 --- a/src/osmo-bsc/bsc_subscr_conn_fsm.c +++ b/src/osmo-bsc/bsc_subscr_conn_fsm.c @@ -652,7 +652,7 @@ void gscon_forget_lchan(struct gsm_subscriber_connection *conn, struct gsm_lchan *lchan) { const char *detach_label = NULL; - if (!conn) + if (!conn || !conn->fi) return; if (!lchan) return; @@ -672,13 +672,12 @@ /* Log for both lchan FSM and conn FSM to ease reading the log in case of problems */ if (detach_label) { - if (conn->fi) - LOGPFSML(conn->fi, LOGL_DEBUG, "conn detaches lchan %s\n", -lchan->fi? osmo_fsm_inst_name(lchan->fi) : gsm_lchan_name(lchan)); + LOGPFSML(conn->fi, LOGL_DEBUG, "conn detaches lchan %s\n", +lchan->fi? osmo_fsm_inst_name(lchan->fi) : gsm_lchan_name(lchan)); if (lchan->fi) LOGPFSML(lchan->fi, LOGL_DEBUG, "conn %s detaches lchan (%s)\n", -conn->fi? osmo_fsm_inst_name(conn->fi) : "(conn without FSM)", +osmo_fsm_inst_name(conn->fi) : "(conn without FSM)", detach_label); } -- To view, visit https://gerrit.osmocom.org/11742 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I62354aa998832131c86535f39a29294000114adc Gerrit-Change-Number: 11742 Gerrit-PatchSet: 1 Gerrit-Owner: Neels Hofmeyr