aboutsummaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-09-14 23:02:48 -0400
committerDavid S. Miller <davem@davemloft.net>2017-09-15 17:51:15 -0400
commit8c7c19a55e41ae69d1cd18ab56e6e9b66a679a7c (patch)
treee41b66148295d87976db3bd0f1514bc97fd86da8 /net
parentd25adbeb0cdb860fb39e09cdd025e9cfc954c5ab (diff)
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 <lucien.xin@gmail.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r--net/sctp/sctp_diag.c1
1 files changed, 0 insertions, 1 deletions
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)
309 cb->nlh->nlmsg_seq, 309 cb->nlh->nlmsg_seq,
310 NLM_F_MULTI, cb->nlh, 310 NLM_F_MULTI, cb->nlh,
311 commp->net_admin) < 0) { 311 commp->net_admin) < 0) {
312 cb->args[3] = 1;
313 err = 1; 312 err = 1;
314 goto release; 313 goto release;
315 } 314 }