Re: Use of M_WAITOK in if_addmulti().

2001-07-15 Thread JINMEI Tatuya / 神明達哉
> On Sun, 15 Jul 2001 16:50:36 -0400 (EDT), > Garrett Wollman <[EMAIL PROTECTED]> said: >> Current if_addmulti() calls MALLOC() with M_WAITOK. However, >> if_addmulti() can be called from in[6]_addmulti() with splnet(). It >> may lead kernel panic. > This is not a problem (or should n

Use of M_WAITOK in if_addmulti().

2001-07-15 Thread Garrett Wollman
< said: > Current if_addmulti() calls MALLOC() with M_WAITOK. However, > if_addmulti() can be called from in[6]_addmulti() with splnet(). It > may lead kernel panic. This is not a problem (or should not be). It is permissible to sleep while some interrupts are blocked; it is just not (in 4-st

Re: Use of M_WAITOK in if_addmulti().

2001-07-15 Thread Alfred Perlstein
* Hajimu UMEMOTO <[EMAIL PROTECTED]> [010715 12:31] wrote: > > ume> Index: sys/net/if.c > ume> diff -u sys/net/if.c.orig sys/net/if.c > ume> --- sys/net/if.c.origMon Jul 16 01:39:34 2001 > ume> +++ sys/net/if.c Mon Jul 16 01:51:49 2001 > > Oops, it was wrong version. One trick is to pass a

Re: Use of M_WAITOK in if_addmulti().

2001-07-15 Thread Hajimu UMEMOTO
ume> Index: sys/net/if.c ume> diff -u sys/net/if.c.orig sys/net/if.c ume> --- sys/net/if.c.orig Mon Jul 16 01:39:34 2001 ume> +++ sys/net/if.c Mon Jul 16 01:51:49 2001 Oops, it was wrong version. Index: sys/net/if.c diff -u sys/net/if.c.orig sys/net/if.c --- sys/net/if.c.orig Mon Jul 1

Re: Use of M_WAITOK in if_addmulti().

2001-07-15 Thread Hajimu UMEMOTO
> On Sun, 15 Jul 2001 09:19:27 -0700 > Julian Elischer <[EMAIL PROTECTED]> said: julian> NOWAIT MAY return. julian> you have not handled the case for when it returns with a NULL allocation julian> so if it returns NULL you continue, and page-fault immediatly. Oops, thank you. How about t

Re: Use of M_WAITOK in if_addmulti().

2001-07-15 Thread Julian Elischer
Hajimu UMEMOTO wrote: NOWAIT MAY return. you have not handled the case for when it returns with a NULL allocation so if it returns NULL you continue, and page-fault immediatly. > > Hi, > > Current if_addmulti() calls MALLOC() with M_WAITOK. However, > if_addmulti() can be called from in[6]_ad

Use of M_WAITOK in if_addmulti().

2001-07-15 Thread Hajimu UMEMOTO
Hi, Current if_addmulti() calls MALLOC() with M_WAITOK. However, if_addmulti() can be called from in[6]_addmulti() with splnet(). It may lead kernel panic. So, I wish to change to use M_NOWAIT. Any comment? Index: sys/net/if.c diff -u sys/net/if.c.orig sys/net/if.c --- sys/net/if.c.orig Wed