All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: netdev@vger.kernel.org
Cc: Vlad Yasevich <vyasevich@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Xin Long <lucien.xin@gmail.com>,
	linux-sctp@vger.kernel.org
Subject: Re: [PATCH net] sctp: fix rcu usage on proc listing
Date: Wed, 20 Jan 2016 01:07:20 +0000	[thread overview]
Message-ID: <20160120010720.GA22183@mrl.redhat.com> (raw)
In-Reply-To: <20160119220230.GA15926@mrl.redhat.com>

On Tue, Jan 19, 2016 at 08:02:30PM -0200, Marcelo Ricardo Leitner wrote:
> > --- a/net/sctp/proc.c
> > +++ b/net/sctp/proc.c
> > @@ -491,6 +491,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
> >  	tsp = (struct sctp_transport *)v;
> >  	assoc = tsp->asoc;
> >  
> > +	rcu_read_lock();

should have used rcu_read_lock_bh() here, will send a v2 tomorrow.

> >  	list_for_each_entry_rcu(tsp, &assoc->peer.transport_addr_list,
> >  				transports) {
> >  		if (tsp->dead)
> > @@ -543,6 +544,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
> >  
> >  		seq_printf(seq, "\n");
> >  	}
> > +	rcu_read_unlock();
> >  
> >  	return 0;
> >  }
> > -- 
> > 2.5.0
> > 
> 

WARNING: multiple messages have this Message-ID (diff)
From: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
To: netdev@vger.kernel.org
Cc: Vlad Yasevich <vyasevich@gmail.com>,
	Neil Horman <nhorman@tuxdriver.com>,
	Xin Long <lucien.xin@gmail.com>,
	linux-sctp@vger.kernel.org
Subject: Re: [PATCH net] sctp: fix rcu usage on proc listing
Date: Tue, 19 Jan 2016 23:07:20 -0200	[thread overview]
Message-ID: <20160120010720.GA22183@mrl.redhat.com> (raw)
In-Reply-To: <20160119220230.GA15926@mrl.redhat.com>

On Tue, Jan 19, 2016 at 08:02:30PM -0200, Marcelo Ricardo Leitner wrote:
> > --- a/net/sctp/proc.c
> > +++ b/net/sctp/proc.c
> > @@ -491,6 +491,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
> >  	tsp = (struct sctp_transport *)v;
> >  	assoc = tsp->asoc;
> >  
> > +	rcu_read_lock();

should have used rcu_read_lock_bh() here, will send a v2 tomorrow.

> >  	list_for_each_entry_rcu(tsp, &assoc->peer.transport_addr_list,
> >  				transports) {
> >  		if (tsp->dead)
> > @@ -543,6 +544,7 @@ static int sctp_remaddr_seq_show(struct seq_file *seq, void *v)
> >  
> >  		seq_printf(seq, "\n");
> >  	}
> > +	rcu_read_unlock();
> >  
> >  	return 0;
> >  }
> > -- 
> > 2.5.0
> > 
> 

  reply	other threads:[~2016-01-20  1:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19 21:59 [PATCH net] sctp: fix rcu usage on proc listing Marcelo Ricardo Leitner
2016-01-19 22:02 ` Marcelo Ricardo Leitner
2016-01-19 22:02   ` Marcelo Ricardo Leitner
2016-01-20  1:07   ` Marcelo Ricardo Leitner [this message]
2016-01-20  1:07     ` Marcelo Ricardo Leitner
2016-01-21 13:05     ` Marcelo Ricardo Leitner
2016-01-21 13:05       ` Marcelo Ricardo Leitner

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=20160120010720.GA22183@mrl.redhat.com \
    --to=marcelo.leitner@gmail.com \
    --cc=linux-sctp@vger.kernel.org \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.com \
    --cc=vyasevich@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.