lkml.org 
[lkml]   [2004]   [Oct]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: __put_task_struct unresolved when being used in modules
From
Date




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. If we had a counted reference, we
could check the state of the task before signaling. In case of the task
being gone, we would release our reference.
We had another idea for solving the problem: is there a possibility that
our module gets notified when the task dies, i.e. is there a notifier_chain
defined for task states? In that case we could do the cleanup of our
notifier list when we receive the notification.

Thomas

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:07    [W:0.044 / U:0.272 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site