All of lore.kernel.org
 help / color / mirror / Atom feed
* [Xenomai-core] [PATCH] Fix to RTDM open problems
@ 2006-01-27 10:29 Anders Blomdell
  2006-01-27 12:03 ` Jan Kiszka
  0 siblings, 1 reply; 3+ messages in thread
From: Anders Blomdell @ 2006-01-27 10:29 UTC (permalink / raw)
  To: xenomai

When RTDM is exposed to code like this:

   device1 = rt_dev_open("some_device", O_RDWR);
   device2 = rt_dev_open("some_device", O_RDWR);

I get a SEGFAULT, which I attribute to a missing assignment to context_ptr in 
the case when the device is already busy, the lack of this assignment leads to a 
segfault in cleanup_instance.


--- xenomai-2.1-rc2/ksrc/skins/rtdm/core.c~     2006-01-07 18:08:34.000000000 +0100
+++ xenomai-2.1-rc2/ksrc/skins/rtdm/core.c      2006-01-27 11:14:43.000000000 +0100
@@ -136,6 +136,8 @@

          if (context->device) {
              xnlock_put_irqrestore(&rt_dev_lock, s);
+
+            *context_ptr = NULL;
              return -EBUSY;
          }
          context->device = device;



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-01-27 12:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-27 10:29 [Xenomai-core] [PATCH] Fix to RTDM open problems Anders Blomdell
2006-01-27 12:03 ` Jan Kiszka
2006-01-27 12:48   ` Luotao Fu

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.