public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Re: [Linux-streams] Re: [PATCH] Re: export of sys_call_tabl
@ 2002-10-10 16:38 Petr Vandrovec
  2002-10-10 16:57 ` David Grothe
  0 siblings, 1 reply; 18+ messages in thread
From: Petr Vandrovec @ 2002-10-10 16:38 UTC (permalink / raw)
  To: David Grothe; +Cc: linux-kernel, LiS, davem, bidulock

On 10 Oct 02 at 11:32, David Grothe wrote:

> Previous patch was "better" but not correct.  How about this? (changed 
> return 0 to return ret).

Yes, it's ok with me. You can still do
register(NULL, notNULL);
register(notNULL, NULL);
without trigerring any error, but maybe that it can be called feature.
                                        Best regards,
                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [Linux-streams] Re: [PATCH] Re: export of sys_call_tabl
@ 2002-10-10 19:41 Petr Vandrovec
  2002-10-11 14:22 ` David Grothe
  0 siblings, 1 reply; 18+ messages in thread
From: Petr Vandrovec @ 2002-10-10 19:41 UTC (permalink / raw)
  To: Arjan van de Ven; +Cc: hch, linux-kernel, LiS, Dave Miller, bidulock, dave

On 10 Oct 02 at 21:33, Arjan van de Ven wrote:
> On Thu, 2002-10-10 at 21:07, David Grothe wrote:
> 
> > LiS is LGPL.  Would it work if the exported symbol was GPL only?
> 
> since LiS becomes GPL when you link it into the kernel with insmod,
> that's not a problem ;)

Only problem is that modutils do not know about LGPL, you must use
"GPL with additional rights" in source (at least Debian's 2.4.19-3),
and "GPL with additional rights" might be too ambiguous for authors.

                                            Petr Vandrovec
                                            vandrove@vc.cvut.cz
                                            

^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [Linux-streams] Re: [PATCH] Re: export of sys_call_tabl
@ 2002-10-10 16:32 David Grothe
  0 siblings, 0 replies; 18+ messages in thread
From: David Grothe @ 2002-10-10 16:32 UTC (permalink / raw)
  To: Petr Vandrovec; +Cc: linux-kernel, LiS, davem, bidulock

Previous patch was "better" but not correct.  How about this? (changed 
return 0 to return ret).

int register_streams_calls(int (*putpmsg) (int, void *, void *, int, int),
                             int (*getpmsg) (int, void *, void *, int, int))
{
         int ret = 0;
         down_write(&streams_call_sem) ; /* should return int, but doesn't */
         if (   (putpmsg != NULL && do_putpmsg != NULL)
             || (getpmsg != NULL && do_getpmsg != NULL)
            )
                 ret = -EBUSY;
         else {
                 do_putpmsg = putpmsg;
                 do_getpmsg = getpmsg;
         }
         up_write(&streams_call_sem);
         return ret ;
}


^ permalink raw reply	[flat|nested] 18+ messages in thread
* Re: [Linux-streams] Re: [PATCH] Re: export of sys_call_tabl
@ 2002-10-10 16:25 Petr Vandrovec
  2002-10-10 16:30 ` David Grothe
  0 siblings, 1 reply; 18+ messages in thread
From: Petr Vandrovec @ 2002-10-10 16:25 UTC (permalink / raw)
  To: David Grothe; +Cc: linux-kernel, LiS, davem, bidulock

On 10 Oct 02 at 11:01, David Grothe wrote:
> 
> Does this patch address your suggestions?  This has been tested on 2.4.19.

Well, it can be that way. But if you are allowing
register_streams_calls(NULL, NULL), maybe you can move 
unregister_streams_calls() to the headers and make it inline.

And you are returning while holding streams_call_sem semaphore
when failing with -EBUSY. It is not good idea.
                                Petr Vandrovec
                                vandrove@vc.cvut.cz                                                    

+int register_streams_calls(int (*putpmsg) (int, void *, void *, int, int),
+               int (*getpmsg) (int, void *, void *, int, int))
+{
+   down_write(&streams_call_sem) ; /* should return int, but doesn't */
+   if (   (putpmsg != NULL && do_putpmsg != NULL)
+       || (getpmsg != NULL && do_getpmsg != NULL)
+      )
+       return -EBUSY;
+   do_putpmsg = putpmsg;
+   do_getpmsg = getpmsg;
+   up_write(&streams_call_sem);
+   return 0 ;
+}
+
+void unregister_streams_calls(void)
+{
+   register_streams_calls(NULL, NULL);
+}
+
 asmlinkage long sys_ni_syscall(void)
 {
    return -ENOSYS;

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

end of thread, other threads:[~2002-10-12 15:24 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-10 16:38 [Linux-streams] Re: [PATCH] Re: export of sys_call_tabl Petr Vandrovec
2002-10-10 16:57 ` David Grothe
2002-10-10 17:27   ` Christoph Hellwig
2002-10-10 19:07     ` David Grothe
2002-10-10 19:33       ` Arjan van de Ven
2002-10-10 20:31       ` David Grothe
     [not found]       ` <20021011180209.A30671@infradead.org>
     [not found]         ` <20021011142657.B32421@openss7.org>
2002-10-12  2:29           ` Ole Husgaard
2002-10-12  9:32             ` Arjan van de Ven
2002-10-12  9:54               ` Brian F. G. Bidulock
2002-10-12  9:56             ` Brian F. G. Bidulock
2002-10-12 11:51               ` Alan Cox
2002-10-12 15:29               ` Ole Husgaard
  -- strict thread matches above, loose matches on Subject: below --
2002-10-10 19:41 Petr Vandrovec
2002-10-11 14:22 ` David Grothe
2002-10-11 14:49   ` Alan Cox
2002-10-10 16:32 David Grothe
2002-10-10 16:25 Petr Vandrovec
2002-10-10 16:30 ` David Grothe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox