From: Jan Kiszka <jan.kiszka@domain.hid>
To: Dmitry Adamushko <dmitry.adamushko@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Xenomai Bug: rt_intr_create with NULL-name leads to Kernel oops in /proc/xenomai/irq
Date: Wed, 10 Jan 2007 15:35:56 +0100 [thread overview]
Message-ID: <45A4F9CC.6070807@domain.hid> (raw)
In-Reply-To: <b647ffbd0701100621k25126a1bldb0bef19be65c92b@domain.hid>
[-- Attachment #1: Type: text/plain, Size: 1953 bytes --]
Dmitry Adamushko wrote:
>> > + if (!err && name) {
>> > + xnpnode_t *pnode = &__intr_pnode;
>> >
>> > - if (!err)
>> > - err =
>> > - xnregistry_enter(intr->name, intr, &intr->handle,
>> > - &__intr_pnode);
>> > + if (!*name) {
>> > + /* Since this is an anonymous object (empty
>> name on entry)
>>
>> Isn't a NULL name representing an anonymous object as well?
>
> Anonymous objects are supported only for user-space clients.
> We agreed on it with Philippe when similar code was introduced for
> other objects. In this case, name is not NULL but "\0" on entry of
> native::rt_object_create (object = mutex,event,etc.).
OK, I see.
>
> Now, don't ask me why the same is not applicable for the kernel-side
> objects as I'll have to think about it (can't recall right now) and
> may overheat. Likely, just some political issues. Yes, we want to make
> life of kernel-side developers a bit more difficult. Namely, want an
> object to be exported via registry? Give a valid name upon its
> creation.
>
>> > - xnintr_init(&intr->intr_base, name, irq, isr, iack, mode);
>> > xnobject_copy_name(intr->name, name);
>> > + xnintr_init(&intr->intr_base, intr->name, irq, isr, iack, mode);
>>
>> This will set xnintr_t::name to "" if name is NULL - intentionally?
>
> xnintr_t::name becomes a reference to RT_INTR::name. The later one
> exists as long as the former anyway so there shoudn't be a broken
> reference.
Yes, this specifically addresses Mathias' concern about passed names
that are temporary variables.
It just leaves xnintr_t::name with an emptry string instead of "unknown"
in some cases. Either xnintr_init needs to take care of this, or we
should catch that case already here. I think empty strings in
/proc/xenomai/irq are bad in case of shared IRQ lists.
Jan
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]
next prev parent reply other threads:[~2007-01-10 14:35 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-10 11:59 [Xenomai-help] Xenomai Bug: rt_intr_create with NULL-name leads to Kernel oops in /proc/xenomai/irq M. Koehrer
2007-01-10 12:35 ` Jan Kiszka
2007-01-10 13:49 ` Dmitry Adamushko
2007-01-10 14:00 ` Jan Kiszka
2007-01-10 14:19 ` Re: [Xenomai-help] Xenomai Bug: rt_intr_create with NULL-name leads M. Koehrer
2007-01-10 14:35 ` Dmitry Adamushko
2007-01-10 14:21 ` [Xenomai-help] Xenomai Bug: rt_intr_create with NULL-name leads to Kernel oops in /proc/xenomai/irq Dmitry Adamushko
2007-01-10 14:29 ` Dmitry Adamushko
2007-01-10 14:35 ` Jan Kiszka [this message]
2007-01-10 14:55 ` Dmitry Adamushko
2007-01-10 15:13 ` Jan Kiszka
2007-01-10 15:58 ` Dmitry Adamushko
2007-01-10 15:59 ` Dmitry Adamushko
2007-01-10 16:32 ` M. Koehrer
2007-01-11 19:19 ` Philippe Gerum
2007-01-11 20:49 ` Jan Kiszka
2007-01-11 21:01 ` Philippe Gerum
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=45A4F9CC.6070807@domain.hid \
--to=jan.kiszka@domain.hid \
--cc=dmitry.adamushko@domain.hid \
--cc=xenomai@xenomai.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.