From: Andrew Morton <akpm@osdl.org>
To: Thomas Spatzier <thomas.spatzier@de.ibm.com>
Cc: hch@infradead.org, linux-kernel@vger.kernel.org
Subject: Re: __put_task_struct unresolved when being used in modules
Date: Wed, 13 Oct 2004 13:52:57 -0700 [thread overview]
Message-ID: <20041013135257.11d65704.akpm@osdl.org> (raw)
In-Reply-To: <OF59CA9171.69619345-ONC1256F2C.003A7BE2-C1256F2C.003B7F4C@de.ibm.com>
Thomas Spatzier <thomas.spatzier@de.ibm.com> wrote:
>
> Christoph Hellwig <hch@infradead.org> wrote on 13.10.2004 12:29:55:
> >
> > In general module shouldn't deal with task reference counts. If we
> decide
> > you have a legitimate reason for doing this from a module after a review
> here
> > on lkml we could add an EXPORT_SYMBOL_GPL at the same time your module
> gets
> > merged.
> >
> The module is actually already in the kernel (drivers/s390/net/qeth.ko).
> We have a userspace daemon that registers with the kernel module and we
> need to send a signal to that daemon, whenever the device driver detects
> some
> change in its managed devices. This is done in qeth_notify_processes (just
> in
> case you want to take a look ;-) ).
> For this purpose, we store a pointer to the daemon's task_struct, so we can
> send a signal to that task. However, if the daemon crashes for some reason,
> we have an invalid task_struct pointer.
Drivers should not be holding references to userspace processes. Your
daemons should instead be holding references to resources within the
driver.
IOW: the daemon should be holding an open file descriptor and should be
blocked in read() or select/poll waiting for activity on that fd.
prev parent reply other threads:[~2004-10-13 20:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-10-13 10:17 Thomas Spatzier
2004-10-13 10:29 ` Christoph Hellwig
2004-10-13 10:49 ` Thomas Spatzier
2004-10-13 20:52 ` Andrew Morton [this message]
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=20041013135257.11d65704.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=hch@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=thomas.spatzier@de.ibm.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
all inboxes | Powered by JetHome®