lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 8 Aug 2017 22:21:58 +0800 (CST)
From:   "Gao Feng" <gfree.wind@....163.com>
To:     "Guillaume Nault" <g.nault@...halink.fr>
Cc:     netdev@...r.kernel.org, "Liu Jianying" <jianying.liu@...ai8.com>,
        "David Miller" <davem@...emloft.net>, linux-ppp@...r.kernel.org,
        "Paul Mackerras" <paulus@...ba.org>
Subject: Re:Re: [PATCH net] ppp: fix xmit recursion detection on ppp
 channels


At 2017-08-08 21:58:27, "Guillaume Nault" <g.nault@...halink.fr> wrote:
>On Tue, Aug 08, 2017 at 09:16:33PM +0800, Gao Feng wrote:
>> At 2017-08-08 17:43:24, "Guillaume Nault" <g.nault@...halink.fr> wrote:
>> >--- a/drivers/net/ppp/ppp_generic.c
>> >+++ b/drivers/net/ppp/ppp_generic.c
>> >@@ -1915,21 +1915,23 @@ static void __ppp_channel_push(struct channel *pch)
>> > 	spin_unlock(&pch->downl);
>> > 	/* see if there is anything from the attached unit to be sent */
>> > 	if (skb_queue_empty(&pch->file.xq)) {
>> >-		read_lock(&pch->upl);
>> > 		ppp = pch->ppp;
>> > 		if (ppp)
>> >-			ppp_xmit_process(ppp);
>> >-		read_unlock(&pch->upl);
>> >+			__ppp_xmit_process(ppp);
>> > 	}
>> > }
>> > 
>> > static void ppp_channel_push(struct channel *pch)
>> > {
>> >-	local_bh_disable();
>> >-
>> >-	__ppp_channel_push(pch);
>> >-
>> >-	local_bh_enable();
>> >+	read_lock_bh(&pch->upl);
>> >+	if (pch->ppp) {
>> >+		(*this_cpu_ptr(pch->ppp->xmit_recursion))++;
>> >+		__ppp_channel_push(pch);
>> >+		(*this_cpu_ptr(pch->ppp->xmit_recursion))--;
>> >+	} else {
>> >+		__ppp_channel_push(pch);
>> >+	}
>> >+	read_unlock_bh(&pch->upl);
>> 
>> If invoked read_lock_bh in ppp_channel_push, it would be unnecessary to invoke read_lock(&pch->upl)
>> in the __ppp_channel_push.
>> 
>But this patch does remove read_lock(&pch->upl) from
>__ppp_channel_push(). Or have I misunderstood your point?

Sorry, it's my fault.
I forgot your former changes when think about the updates in ppp_channel_push

Best Regards
Feng

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ