public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Peter Hurley <peter@hurleysoftware•com>
To: Oleg Nesterov <oleg@redhat•com>
Cc: Sree Harsha Totakura <sreeharsha@totakura•in>,
	linux-kernel@vger•kernel.org, netdev@vger•kernel.org,
	"Eric W. Biederman" <ebiederm@xmission•com>
Subject: Re: pppd service crash in linux-3.13.6
Date: Fri, 14 Mar 2014 10:19:17 -0400	[thread overview]
Message-ID: <53230FE5.9020204@hurleysoftware.com> (raw)
In-Reply-To: <5321F113.7090000@hurleysoftware.com>

[ +cc Eric Biederman ]

On 03/13/2014 01:55 PM, Peter Hurley wrote:
> Hi Oleg,
>
> On 03/13/2014 01:06 PM, Oleg Nesterov wrote:
>> On 03/10, Peter Hurley wrote:
>>>
>>> [ +cc Oleg Nesterov ]
>>
>> Thanks.
>>
>>> The NULL ptr dereference is from following the current->nsproxy ptr
>>> in ppp_register_channel().
>>>
>>> This was broken by
>>>
>>> commit 8aac62706adaaf0fab02c4327761561c8bda9448
>>> Author: Oleg Nesterov <oleg@redhat•com>
>>> Date:   Fri Jun 14 21:09:49 2013 +0200
>>>
>>>      move exit_task_namespaces() outside of exit_notify()
>>>
>>> which moved the exit_task_namespaces(tsk) before disassociate_ctty().
>>
>> Heh. OK, we can move it down after disassociate_ctty(), the original
>> motivation for that commit was the problem which was also (hopefully)
>> fixed by e7b2c406925273 "fput: task_work_add() can fail if the caller
>> has passed exit_task_work()".

Thanks for fixing that!
tty teardown (hangup from disassociate_ctty) requires fput() to work :)

> I didn't look into what motivated the change; I will now though.
>
>> In fact I think that it makes sense to move it down after
>> exit_task_work() anyway. But this is almost off-topic and I'd like to
>> avoid this right now.
>>
>> OTOH, why we should delay disassociate_ctty? IOW, do you see any
>> potential problem with the trivial patch below?

Won't work.

> I have no idea what kind of dependencies might exist between
> task works, cgroup_exit() and all the teardown that disassociate_ctty()
> does. I'll look into though.

cgroup_exit() can exec a userspace process (the notify_on_exit() facility)
which requires both namespace and tty facilities.
Plus, proc_exit_connector() uses netlink which uses user_ns.

I think it's better to have task namespaces valid up to exit_notify().

Regards,
Peter Hurley

  reply	other threads:[~2014-03-14 14:19 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <531A37FF.4000509@totakura.in>
2014-03-10 16:56 ` pppd service crash in linux-3.13.6 Sree Harsha Totakura
2014-03-10 19:23   ` Peter Hurley
2014-03-13 17:06     ` Oleg Nesterov
2014-03-13 17:55       ` Peter Hurley
2014-03-14 14:19         ` Peter Hurley [this message]
2014-03-14 15:02           ` Peter Hurley
2014-03-14 19:23           ` Oleg Nesterov
2014-03-14 20:28             ` Peter Hurley
2014-03-14 21:04               ` Oleg Nesterov
2014-03-15 12:49                 ` Peter Hurley
2014-03-17 18:04                   ` [PATCH 0/2] (Was: pppd service crash in linux-3.13.6) Oleg Nesterov
2014-03-17 18:04                     ` [PATCH 1/2] exit: call disassociate_ctty() before exit_task_namespaces() Oleg Nesterov
2014-03-17 18:05                     ` [PATCH 2/2] exit: move check_stack_usage() to the end of do_exit() Oleg Nesterov
2014-03-10 19:54   ` pppd service crash in linux-3.13.6 Ben Hutchings
2014-03-12 21:25     ` Sree Harsha Totakura

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=53230FE5.9020204@hurleysoftware.com \
    --to=peter@hurleysoftware$(echo .)com \
    --cc=ebiederm@xmission$(echo .)com \
    --cc=linux-kernel@vger$(echo .)kernel.org \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=oleg@redhat$(echo .)com \
    --cc=sreeharsha@totakura$(echo .)in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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