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

Commit 96c252bf authored by Jon Maloy's avatar Jon Maloy Committed by David S. Miller
Browse files

tipc: fix bug on error path in tipc_topsrv_kern_subscr()



In commit cc1ea9ffadf7 ("tipc: eliminate struct tipc_subscriber") we
re-introduced an old bug on the error path in the function
tipc_topsrv_kern_subscr(). We now re-introduce the correction too.

Reported-by: default avatar <syzbot+f62e0f2a0ef578703946@syzkaller.appspotmail.com>
Signed-off-by: default avatarJon Maloy <jon.maloy@ericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cc35b396
Loading
Loading
Loading
Loading
+4 −3
Original line number Original line Diff line number Diff line
@@ -580,9 +580,10 @@ bool tipc_topsrv_kern_subscr(struct net *net, u32 port, u32 type, u32 lower,
	*conid = con->conid;
	*conid = con->conid;
	con->sock = NULL;
	con->sock = NULL;
	rc = tipc_conn_rcv_sub(tipc_topsrv(net), con, &sub);
	rc = tipc_conn_rcv_sub(tipc_topsrv(net), con, &sub);
	if (rc < 0)
	if (rc >= 0)
		tipc_conn_close(con);
		return true;
	return !rc;
	conn_put(con);
	return false;
}
}


void tipc_topsrv_kern_unsubscr(struct net *net, int conid)
void tipc_topsrv_kern_unsubscr(struct net *net, int conid)