linux-ppp.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philp Prindeville <philipp@redfish-solutions.com>
To: Feng Gao <gfree.wind@gmail.com>
Cc: Gao Feng <fgao@48lvckh6395k16k5.yundunddos.com>,
	paulus@samba.org, linux-ppp@vger.kernel.org,
	Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: [PATCH 1/1] ppp: Fix one deadlock issue of PPP when send frame
Date: Thu, 18 Aug 2016 16:48:27 +0000	[thread overview]
Message-ID: <fcdca34b-cfbb-4536-b857-843218645b82@redfish-solutions.com> (raw)
In-Reply-To: <CA+6hz4rUGeqohKCiTbeqp9NwkH5w_JKjqD8VEiQC4DyVL7Q7JA@mail.gmail.com>



On 08/18/2016 09:05 AM, Feng Gao wrote:
> On Thu, Aug 18, 2016 at 10:11 PM, Philp Prindeville
> <philipp@redfish-solutions.com>  wrote:
>> >Feng,
>> >
>> >If the CPU can already be holding the lock, that implies re-entrancy.
>> >What's to stop the first flow of code which acquired the lock from releasing
>> >it again before the 2nd flow is done?  Is the 2nd flow running at a higher
>> >priority or with interrupts disabled?
> There is no preemption happened. It is caused by wrong route policy by l2tp.
> For example, the cpu0 get the spinlock of channel1, then the channel1
> is selected again after route. As a result, cpu0 tries to get the same
> spinlock again.
>
> The call flow is like this.
> ppp_write->ppp_channel_push->start_xmit->select inappropriate route
> .... -> dev_hard_start_xmit->ppp_start_xmit->ppp_xmit_process->
> ppp_push. Now ppp_push tries to get the same spinlock which is held
> in ppp_channel_push.
>
> Regards
> Feng
>

If we're detecting (through the fact that the lock has already been 
acquired) that the wrong route is being applied, why don't we just punt 
the packet instead?

-Philip


  reply	other threads:[~2016-08-18 16:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-16 11:05 [PATCH 1/1] ppp: Fix one deadlock issue of PPP when send frame fgao
2016-08-16 11:36 ` Feng Gao
2016-08-18 14:11   ` Philp Prindeville
2016-08-18 15:05     ` Feng Gao
2016-08-18 16:48       ` Philp Prindeville [this message]
2016-08-18 22:53         ` Feng Gao
2016-08-19 22:47     ` Guillaume Nault
2016-08-19 15:16 ` [PATCH 1/1] ppp: Fix one deadlock issue of PPP when reentrant fgao
2016-08-19 21:48   ` Guillaume Nault
2016-08-20  6:40     ` Feng Gao

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=fcdca34b-cfbb-4536-b857-843218645b82@redfish-solutions.com \
    --to=philipp@redfish-solutions.com \
    --cc=fgao@48lvckh6395k16k5.yundunddos.com \
    --cc=gfree.wind@gmail.com \
    --cc=linux-ppp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=paulus@samba.org \
    /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).