[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <20160301.161457.2060844348418737617.davem@davemloft.net>
Date: Tue, 01 Mar 2016 16:14:57 -0500 (EST)
From: David Miller <davem@...emloft.net>
To: g.nault@...halink.fr
Cc: netdev@...r.kernel.org, paulus@...ba.org
Subject: Re: [PATCH net] ppp: lock ppp->flags in ppp_read() and ppp_poll()
From: Guillaume Nault <g.nault@...halink.fr>
Date: Fri, 26 Feb 2016 18:45:34 +0100
> @@ -443,9 +443,14 @@ static ssize_t ppp_read(struct file *file, char __user *buf,
> * network traffic (demand mode).
> */
> struct ppp *ppp = PF_TO_PPP(pf);
> +
> + ppp_recv_lock(ppp);
> if (ppp->n_channels == 0 &&
> - (ppp->flags & SC_LOOP_TRAFFIC) == 0)
> + (ppp->flags & SC_LOOP_TRAFFIC) == 0) {
> + ppp_recv_unlock(ppp);
> break;
> + }
I agree with this change because these two tests much be done without either
of them changing meanwhile, so I'll apply this to 'net', thanks!
Powered by blists - more mailing lists