[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20060830094943.bad0d618.akpm@osdl.org>
Date: Wed, 30 Aug 2006 09:49:43 -0700
From: Andrew Morton <akpm@...l.org>
To: Cedric Le Goater <clg@...ibm.com>
Cc: Sukadev Bhattiprolu <sukadev@...ibm.com>,
video4linux-list@...hat.com,
Mauro Carvalho Chehab <mchehab@...radead.org>,
kraxel@...esex.org, haveblue@...ibm.com, serue@...ibm.com,
Containers@...ts.osdl.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] kthread: saa7134-tvaudio.c
On Wed, 30 Aug 2006 18:30:27 +0200
Cedric Le Goater <clg@...ibm.com> wrote:
> Andrew Morton wrote:
> > On Tue, 29 Aug 2006 14:15:55 -0700
> > Sukadev Bhattiprolu <sukadev@...ibm.com> wrote:
> >
> >> Replace kernel_thread() with kthread_run() since kernel_thread()
> >> is deprecated in drivers/modules.
> >>
> >> Note that this driver, like a few others, allows SIGTERM. Not
> >> sure if that is affected by conversion to kthread. Appreciate
> >> any comments on that.
> >>
> >
> > hm, I think this driver needs more help.
> >
> > - It shouldn't be using signals at all, really. Signals are for
> > userspace IPC. The kernel internally has better/richer/faster/tighter
> > ways of inter-thread communication.
> >
> > - saa7134_tvaudio_fini()-versus-tvaudio_sleep() looks racy:
> >
> > if (dev->thread.scan1 == dev->thread.scan2 && !dev->thread.shutdown) {
> > if (timeout < 0) {
> > set_current_state(TASK_INTERRUPTIBLE);
> > schedule();
> >
> > If the wakeup happens after the test of dev->thread.shutdown, that sleep will
> > be permanent.
> >
> >
> > So in general, yes, the driver should be converted to the kthread API -
> > this is a requirement for virtualisation, but I forget why, and that's the
> > "standard" way of doing it.
> >
> > - The signal stuff should go away if at all possible.
>
> The thread of this driver allows SIGTERM for some obscure reason. Not sure
> why, I didn't find anything relying on it.
>
> could we just remove the allow_signal() ?
>
I hope so. However I have a bad feeling that the driver wants to accept
signals from userspace. Hopefully Mauro & co will be able to clue us in.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists