From: Xin Long Date: Fri, 15 Sep 2017 03:02:48 +0000 (+0800) Subject: sctp: do not mark sk dumped when inet_sctp_diag_fill returns err X-Git-Tag: v4.14-rc1~3^2~4 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=8c7c19a55e41ae69d1cd18ab56e6e9b66a679a7c;p=linux.git sctp: do not mark sk dumped when inet_sctp_diag_fill returns err sctp_diag would not actually dump out sk/asoc if inet_sctp_diag_fill returns err, in which case it shouldn't mark sk dumped by setting cb->args[3] as 1 in sctp_sock_dump(). Otherwise, it could cause some asocs to have no parent's sk dumped in 'ss --sctp'. So this patch is to not set cb->args[3] when inet_sctp_diag_fill() returns err in sctp_sock_dump(). Fixes: 8f840e47f190 ("sctp: add the sctp_diag.c file") Signed-off-by: Xin Long Acked-by: Marcelo Ricardo Leitner Acked-by: Neil Horman Signed-off-by: David S. Miller --- diff --git a/net/sctp/sctp_diag.c b/net/sctp/sctp_diag.c index 7008a992749b..22ed01a76b19 100644 --- a/net/sctp/sctp_diag.c +++ b/net/sctp/sctp_diag.c @@ -309,7 +309,6 @@ static int sctp_sock_dump(struct sctp_transport *tsp, void *p) cb->nlh->nlmsg_seq, NLM_F_MULTI, cb->nlh, commp->net_admin) < 0) { - cb->args[3] = 1; err = 1; goto release; }