From: Peter Hurley <peter@hurleysoftware.com>
To: "Ma, Xindong" <xindong.ma@intel.com>,
Oleg Nesterov <oleg@redhat.com>,
Al Viro <viro@ZenIV.linux.org.uk>
Cc: "akpm@linux-foundation.org" <akpm@linux-foundation.org>,
"mhocko@suse.cz" <mhocko@suse.cz>,
"mingo@kernel.org" <mingo@kernel.org>,
"peterz@infradead.org" <peterz@infradead.org>,
"riel@redhat.com" <riel@redhat.com>,
"ionut.m.alexa@gmail.com" <ionut.m.alexa@gmail.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"Zhang, Di" <di.zhang@intel.com>,
"Sun, Zhonghua" <zhonghua.sun@intel.com>
Subject: Re: [PATCH] move exit_task_work() before exit_fs().
Date: Sun, 28 Dec 2014 20:09:41 -0500 [thread overview]
Message-ID: <54A0A9D5.2010804@hurleysoftware.com> (raw)
In-Reply-To: <3917C05D9F83184EAA45CE249FF1B1DD0266FC53@SHSMSX103.ccr.corp.intel.com>
On 12/28/2014 07:58 PM, Ma, Xindong wrote:
>>
>> On 12/26, Leon Ma wrote:
>>>
>>> We encountered following panic. The scenario is the process is exiting
>>> and executing its task work. When closing dev node, the driver
>>> triggers a firmware reload according to device status. Because task->fs is
>> set to NULL in exit_fs(), panic happens.
>>
>> I think this should be fixed somewhere else...
> Yes, for this panic, I also think driver is not perfect and need a fix. But kernel should not add the limitation like this...
>>
>>> Task work is a common interface, we should not limite the resource the
>> user will utilize.
>>
>> Exactly. And note that with this patch exit_mm()..disassociate_ctty() paths
>> can't use task works.
> I don't get this. Currently disassociate_ctty() is also called after exit_mm() and exit_task_work(). My patch didn't change this.
??
742- if (group_dead)
743: disassociate_ctty(1);
744- exit_task_namespaces(tsk);
745- exit_task_work(tsk);
746- exit_thread();
>> Not to mention that this patch moves exit_files() up, even before exit_mm(),
>> without any explanation.
> Moving exit_files() up is because exit_files() closes files and add tasks to task works.
>>
>> Add Al. May be we can move exit_fs() down after exit_task_work(), I dunno,
>> but to me it would be better to change the driver.
>>
> I'm OK with this suggestion to fix this issue. I'm not sure whether in the future task work users will access other resources and expose other issues.
>
next prev parent reply other threads:[~2014-12-29 1:09 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-26 7:45 [PATCH] move exit_task_work() before exit_fs() Leon Ma
2014-12-26 17:38 ` Oleg Nesterov
2014-12-29 0:58 ` Ma, Xindong
2014-12-29 1:09 ` Peter Hurley [this message]
2014-12-29 1:32 ` Ma, Xindong
2014-12-26 19:30 ` Al Viro
2014-12-29 1:33 ` Ma, Xindong
2014-12-29 2:18 ` Al Viro
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=54A0A9D5.2010804@hurleysoftware.com \
--to=peter@hurleysoftware.com \
--cc=akpm@linux-foundation.org \
--cc=di.zhang@intel.com \
--cc=ionut.m.alexa@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mhocko@suse.cz \
--cc=mingo@kernel.org \
--cc=oleg@redhat.com \
--cc=peterz@infradead.org \
--cc=riel@redhat.com \
--cc=viro@ZenIV.linux.org.uk \
--cc=xindong.ma@intel.com \
--cc=zhonghua.sun@intel.com \
/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