Return-Path: Received: from m12-16.163.com ([220.181.12.16]:41712 "EHLO m12-16.163.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932239AbcKMIug (ORCPT ); Sun, 13 Nov 2016 03:50:36 -0500 Subject: Re: Can I move a kernel thread into a special mount namespace To: Greg KH References: <69ad7e46-26ae-2e7b-3eda-31a676203fac@163.com> <20161026123132.GA4721@kroah.com> Cc: linux-fsdevel@vger.kernel.org From: Mark Message-ID: Date: Sun, 13 Nov 2016 16:50:09 +0800 MIME-Version: 1.0 In-Reply-To: <20161026123132.GA4721@kroah.com> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On 2016/10/26 20:31, Greg KH Wrote: > On Sun, Oct 16, 2016 at 07:18:43PM +0800, Mark wrote: >> Hi, >> >> Our requirement is, a user process sends a command to a kernel (3.10) >> module, and the kernel module creates a kernel thread, which has to be >> in same mount space with the user process since they have to access a >> same path, which is not mounted in root namespace. But seems all kernel >> threads have one parent "threadd", which is in root name space. > > Very odd requirement, do you have a pointer to your code anywhere? What > exactly will that kernel thread do? > > And why use such an obsolete and old kernel version? > > thanks, > > greg k-h > The kernel thread checks a file and if it exists then do something, but the file is created in a separate namespace. Is this an odd requirement? I cannot post the code. It's on an android release so kernel is 3.10. Is there a solution on a newer kernel release? Thank you very much, and sorry for late response:)