[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1487693324.2885.17.camel@decadent.org.uk>
Date: Tue, 21 Feb 2017 16:08:44 +0000
From: Ben Hutchings <ben@...adent.org.uk>
To: Alexander Popov <alex.popov@...ux.com>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
Xin Long <lucien.xin@...il.com>
Cc: stable@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4.4 14/20] sctp: avoid BUG_ON on sctp_wait_for_sndbuf
On Thu, 2017-02-16 at 09:53 -0800, Greg Kroah-Hartman wrote:
> 4.4-stable review patch. If anyone has any objections, please let me know.
>
> ------------------
>
> From: Marcelo Ricardo Leitner <marcelo.leitner@...il.com>
>
>
> [ Upstream commit 2dcab598484185dea7ec22219c76dcdd59e3cb90 ]
[...]
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -6960,7 +6960,8 @@ static int sctp_wait_for_sndbuf(struct s
> */
> release_sock(sk);
> current_timeo = schedule_timeout(current_timeo);
> - BUG_ON(sk != asoc->base.sk);
> + if (sk != asoc->base.sk)
> + goto do_error;
This function normally returns with sk still locked, but in this case
it returns with sk unlocked. Perhaps this check should be moved after
the lock_sock(sk)?
Ben.
> lock_sock(sk);
>
> *timeo_p = current_timeo;
>
>
--
Ben Hutchings
73.46% of all statistics are made up.
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists