* [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
@ 2017-09-15 3:02 Xin Long
2017-09-15 12:55 ` Marcelo Ricardo Leitner
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Xin Long @ 2017-09-15 3:02 UTC (permalink / raw)
To: network dev, linux-sctp; +Cc: davem, Marcelo Ricardo Leitner, Neil Horman
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>
---
net/sctp/sctp_diag.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/sctp/sctp_diag.c b/net/sctp/sctp_diag.c
index 7008a99..22ed01a 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;
}
--
2.1.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
2017-09-15 3:02 [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err Xin Long
@ 2017-09-15 12:55 ` Marcelo Ricardo Leitner
2017-09-15 12:59 ` Neil Horman
2017-09-15 21:51 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Marcelo Ricardo Leitner @ 2017-09-15 12:55 UTC (permalink / raw)
To: Xin Long; +Cc: network dev, linux-sctp, davem, Neil Horman
On Fri, Sep 15, 2017 at 11:02:48AM +0800, Xin Long wrote:
> 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>
> ---
> net/sctp/sctp_diag.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/net/sctp/sctp_diag.c b/net/sctp/sctp_diag.c
> index 7008a99..22ed01a 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;
> }
> --
> 2.1.0
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-sctp" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
2017-09-15 3:02 [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err Xin Long
2017-09-15 12:55 ` Marcelo Ricardo Leitner
@ 2017-09-15 12:59 ` Neil Horman
2017-09-15 21:51 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: Neil Horman @ 2017-09-15 12:59 UTC (permalink / raw)
To: Xin Long; +Cc: network dev, linux-sctp, davem, Marcelo Ricardo Leitner
On Fri, Sep 15, 2017 at 11:02:48AM +0800, Xin Long wrote:
> 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>
> ---
> net/sctp/sctp_diag.c | 1 -
> 1 file changed, 1 deletion(-)
>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err
2017-09-15 3:02 [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err Xin Long
2017-09-15 12:55 ` Marcelo Ricardo Leitner
2017-09-15 12:59 ` Neil Horman
@ 2017-09-15 21:51 ` David Miller
2 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2017-09-15 21:51 UTC (permalink / raw)
To: lucien.xin; +Cc: netdev, linux-sctp, marcelo.leitner, nhorman
From: Xin Long <lucien.xin@gmail.com>
Date: Fri, 15 Sep 2017 11:02:48 +0800
> 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>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-09-15 21:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-15 3:02 [PATCH net] sctp: do not mark sk dumped when inet_sctp_diag_fill returns err Xin Long
2017-09-15 12:55 ` Marcelo Ricardo Leitner
2017-09-15 12:59 ` Neil Horman
2017-09-15 21:51 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox