[Devel] Re: [PATCH] bluetooth bnep: Convert to kthread API.

Satyam Sharma satyam.sharma at gmail.com
Sat Apr 21 09:11:28 PDT 2007


Hello,

On 4/20/07, Cedric Le Goater <clg at fr.ibm.com> wrote:
> Cedric Le Goater wrote:
> > Andrew Morton wrote:
> >> On Thu, 19 Apr 2007 01:58:51 -0600
> >> "Eric W. Biederman" <ebiederm at xmission.com> wrote:
> >>>
> >>>
> >>> +   task = kthread_run(bnep_session, s, "kbnepd %s", dev->name);
> >> It's unusual to have a kernel thread which has a space in its name.  That
> >> could trip up infufficient-defensive userspace tools.

But all kernel threads are supposed to be only *in-kernel*
implementation details. Isn't a userspace tool whose behaviour relies
on the existence (or even the knowledge of the existence) of any
kernel thread *broken by design*?

> > but we can't just change it, can we ? i could be used by a user space tool
> > to check if the thread is running.

Yes, so although userspace shouldn't be bothering with kernel threads
in the first place, that does not mean that such tools do not exist.
So we'll have to live with this (unfortunate) naming for some time,
till we can get rid of it later.

Which is similar to the habit of some kernel threads in there that
actually *do* want to export the knowledge of their existence (and
even a signals-based interface!) to userspace. Eric did receive some
nacks on his patches that tried to remove the signals business from
kernel threads on this account, but perhaps that too is something that
we could get rid of later (hopefully by that time those using signals
in kernel threads would have realized their folly and shifted to
something else :-)

Satyam




More information about the Devel mailing list