From: Greg KH <greg@kroah.com>
To: Guillaume Thouvenin <guillaume.thouvenin@bull.net>
Cc: Andrew Morton <akpm@osdl.org>,
lkml <linux-kernel@vger.kernel.org>,
Gerrit Huizenga <gh@us.ibm.com>,
elsa-devel <elsa-devel@lists.sourceforge.net>,
Jay Lan <jlan@engr.sgi.com>
Subject: Re: [RFC][PATCH 2.6.11-rc3-mm2] Relay Fork Module
Date: Fri, 11 Feb 2005 11:11:12 -0800 [thread overview]
Message-ID: <20050211191112.GB19139@kroah.com> (raw)
In-Reply-To: <1108134520.14068.66.camel@frecb000711.frec.bull.fr>
On Fri, Feb 11, 2005 at 04:08:40PM +0100, Guillaume Thouvenin wrote:
> +void kobject_fork(struct kobject *kobj, pid_t parent, pid_t child)
> +{
> +#ifdef CONFIG_KOBJECT_UEVENT
No, provide two different functions. In a header file make it a static
inline function that does nothing if this option is not selected, so as
to make the code just go away, and the call is never made.
> + char *kobj_path = NULL;
> + char *action_string = NULL;
> + char **envp = NULL;
> + char ppid_string[FORK_BUFFER_SIZE];
> + char cpid_string[FORK_BUFFER_SIZE];
> +
> + if (!uevent_sock)
> + return;
> +
> + action_string = action_to_string(KOBJ_FORK);
> + if (!action_string)
> + return;
> +
> + kobj_path = kobject_get_path(kobj, GFP_KERNEL);
> + if (!kobj_path)
> + return;
How is there a path for a kobject that is never registered with sysfs?
I agree with Andrew, why are you using a kobject for this? Have you
looked at the "connector" code that is in the -mm tree? That might be a
better solution for this, and it will be going into the kernel tree
after 2.6.11 is released.
> +EXPORT_SYMBOL(kobject_fork);
EXPORT_SYMBOL_GPL() for something like this please.
thanks,
greg k-h
next prev parent reply other threads:[~2005-02-11 19:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-02-07 14:24 [RFC][PATCH 2.6.11-rc3-mm1] " Guillaume Thouvenin
2005-02-07 23:46 ` Andrew Morton
2005-02-08 8:34 ` Guillaume Thouvenin
2005-02-11 8:11 ` [RFC][PATCH 2.6.11-rc3-mm2] " Guillaume Thouvenin
2005-02-11 8:54 ` Andrew Morton
2005-02-11 12:32 ` Guillaume Thouvenin
2005-02-11 15:08 ` Guillaume Thouvenin
2005-02-11 19:11 ` Greg KH [this message]
2005-02-14 8:26 ` Guillaume Thouvenin
2005-02-14 17:41 ` Greg KH
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=20050211191112.GB19139@kroah.com \
--to=greg@kroah.com \
--cc=akpm@osdl.org \
--cc=elsa-devel@lists.sourceforge.net \
--cc=gh@us.ibm.com \
--cc=guillaume.thouvenin@bull.net \
--cc=jlan@engr.sgi.com \
--cc=linux-kernel@vger.kernel.org \
/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®