From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: Xin Long <lucien.xin@gmail.com>
Cc: network dev <netdev@vger.kernel.org>,
linux-sctp@vger.kernel.org, Neil Horman <nhorman@tuxdriver.com>,
davem@davemloft.net
Subject: Re: [PATCH net-next] sctp: use read_lock_bh in sctp_eps_seq_show
Date: Sat, 10 Jun 2017 13:02:05 -0300 [thread overview]
Message-ID: <20170610160205.GC5799@localhost.localdomain> (raw)
In-Reply-To: <f845585a99f0cb76659f4d5dae4f7d6fd5552224.1497078812.git.lucien.xin@gmail.com>
On Sat, Jun 10, 2017 at 03:13:32PM +0800, Xin Long wrote:
> This patch is to use read_lock_bh instead of local_bh_disable
> and read_lock in sctp_eps_seq_show.
>
> Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
> ---
> net/sctp/proc.c | 6 ++----
> 1 file changed, 2 insertions(+), 4 deletions(-)
>
> diff --git a/net/sctp/proc.c b/net/sctp/proc.c
> index 5a27d0f..8e34db5 100644
> --- a/net/sctp/proc.c
> +++ b/net/sctp/proc.c
> @@ -218,8 +218,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
> return -ENOMEM;
>
> head = &sctp_ep_hashtable[hash];
> - local_bh_disable();
> - read_lock(&head->lock);
> + read_lock_bh(&head->lock);
> sctp_for_each_hentry(epb, &head->chain) {
> ep = sctp_ep(epb);
> sk = epb->sk;
> @@ -234,8 +233,7 @@ static int sctp_eps_seq_show(struct seq_file *seq, void *v)
> sctp_seq_dump_local_addrs(seq, epb);
> seq_printf(seq, "\n");
> }
> - read_unlock(&head->lock);
> - local_bh_enable();
> + read_unlock_bh(&head->lock);
>
> return 0;
> }
> --
> 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
>
next prev parent reply other threads:[~2017-06-10 16:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-10 7:13 [PATCH net-next] sctp: use read_lock_bh in sctp_eps_seq_show Xin Long
2017-06-10 16:02 ` Marcelo Ricardo Leitner [this message]
2017-06-10 20:23 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170610160205.GC5799@localhost.localdomain \
--to=marcelo.leitner@gmail.com \
--cc=davem@davemloft.net \
--cc=linux-sctp@vger.kernel.org \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).