Re: kern/104738: [inet] [patch] Reentrant problem with inet_ntoa in the kernel

2013-07-02 Thread linimon
Synopsis: [inet] [patch] Reentrant problem with inet_ntoa in the kernel State-Changed-From-To: open->open State-Changed-By: linimon State-Changed-When: Wed Jul 3 00:50:32 UTC 2013 State-Changed-Why: commit bit has been taken in for safekeeping. Responsible-Changed-From-To: mlaier->freeb

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-10 Thread MQ
2006/11/10, Bruce Evans <[EMAIL PROTECTED]>: On Fri, 10 Nov 2006, MQ wrote: > 2006/11/5, Bruce Evans <[EMAIL PROTECTED]>: >> >> On Sat, 4 Nov 2006, Brooks Davis wrote: >> >> > On Sat, Nov 04, 2006 at 02:46:30AM +, MQ wrote: >> >> 2006/11/3, Brooks Davis <[EMAIL PROTECTED]>: >> >> >>> The pa

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-10 Thread Bruce Evans
On Fri, 10 Nov 2006, MQ wrote: 2006/11/5, Bruce Evans <[EMAIL PROTECTED]>: On Sat, 4 Nov 2006, Brooks Davis wrote: > On Sat, Nov 04, 2006 at 02:46:30AM +, MQ wrote: >> 2006/11/3, Brooks Davis <[EMAIL PROTECTED]>: >>> The particular definition used is excedingly ugly. At a minimum there

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-10 Thread MQ
2006/11/5, Bruce Evans <[EMAIL PROTECTED]>: On Sat, 4 Nov 2006, Brooks Davis wrote: > On Sat, Nov 04, 2006 at 02:46:30AM +, MQ wrote: >> 2006/11/3, Brooks Davis <[EMAIL PROTECTED]>: >>> The particular definition used is excedingly ugly. At a minimum there >>> needs to be a define or a con

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-05 Thread LI Xin
MQ wrote: [snip] >> >> By the way, maybe printf should get better synchronized. > When I was addressing some problems in the bge(4), the > ill-synchronized printf made my console freezing before > I restarted the machine. Are you really sure that it's the culprit of freezing your console (I think

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-05 Thread Bruce Evans
On Sat, 4 Nov 2006, Brooks Davis wrote: On Sat, Nov 04, 2006 at 02:46:30AM +, MQ wrote: 2006/11/3, Brooks Davis <[EMAIL PROTECTED]>: The particular definition used is excedingly ugly. At a minimum there needs to be a define or a constant "16" for the lenght rather than the 4*sizeof("123

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-05 Thread Bruce Evans
On Sat, 4 Nov 2006, Brooks Davis wrote: On Sat, Nov 04, 2006 at 03:01:00AM +, MQ wrote: 2006/11/3, Max Laier <[EMAIL PROTECTED]>: On Friday 03 November 2006 10:46, MQ wrote: By the way, implementing a printf/log which understands ipv4 address is tedious, perhaps. It certainly is. Actua

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-04 Thread MQ
2006/11/5, Brooks Davis <[EMAIL PROTECTED]>: On Sat, Nov 04, 2006 at 02:46:30AM +, MQ wrote: > 2006/11/3, Brooks Davis <[EMAIL PROTECTED]>: > > > >On Fri, Nov 03, 2006 at 09:46:47AM +, MQ wrote: > >> 2006/11/2, Brooks Davis <[EMAIL PROTECTED]>: > >> > > >> >On Thu, Nov 02, 2006 at 08:26:

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-04 Thread Brooks Davis
On Sat, Nov 04, 2006 at 02:46:30AM +, MQ wrote: > 2006/11/3, Brooks Davis <[EMAIL PROTECTED]>: > > > >On Fri, Nov 03, 2006 at 09:46:47AM +, MQ wrote: > >> 2006/11/2, Brooks Davis <[EMAIL PROTECTED]>: > >> > > >> >On Thu, Nov 02, 2006 at 08:26:27AM +, . wrote: > >> >> Hi, > >> >> > >> >>

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-04 Thread Brooks Davis
On Sat, Nov 04, 2006 at 03:01:00AM +, MQ wrote: > I use google mail web interface to post messages, I can't connect to the > google mail POP server because someone disabled it on the firewall :( > > I don't know if this post will be better? > > 2006/11/3, Max Laier <[EMAIL PROTECTED]>: > > >

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-03 Thread MQ
I use google mail web interface to post messages, I can't connect to the google mail POP server because someone disabled it on the firewall :( I don't know if this post will be better? 2006/11/3, Max Laier <[EMAIL PROTECTED]>: Hello "MQ", your email client is seriously mis-configured, could y

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-03 Thread MQ
2006/11/3, Brooks Davis <[EMAIL PROTECTED]>: On Fri, Nov 03, 2006 at 09:46:47AM +, MQ wrote: > 2006/11/2, Brooks Davis <[EMAIL PROTECTED]>: > > > >On Thu, Nov 02, 2006 at 08:26:27AM +, . wrote: > >> Hi, > >> > >> I am confused by the use of inet_ntoa function in the kernel. > >> > >> The

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-03 Thread Brooks Davis
On Fri, Nov 03, 2006 at 09:46:47AM +, MQ wrote: > 2006/11/2, Brooks Davis <[EMAIL PROTECTED]>: > > > >On Thu, Nov 02, 2006 at 08:26:27AM +, . wrote: > >> Hi, > >> > >> I am confused by the use of inet_ntoa function in the kernel. > >> > >> The function inet_ntoa in the /sys/libkern/inet_nto

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-03 Thread Max Laier
Hello "MQ", your email client is seriously mis-configured, could you please look into this as it is a bit annoying. On Friday 03 November 2006 10:46, MQ wrote: > 2006/11/2, Brooks Davis <[EMAIL PROTECTED]>: > > On Thu, Nov 02, 2006 at 08:26:27AM +, . wrote: > > > Hi, > > > > > > I am confuse

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-03 Thread MQ
2006/11/2, Max Laier <[EMAIL PROTECTED]>: On Thursday 02 November 2006 11:32, LI Xin wrote: > VANHULLEBUS Yvan wrote: > > On Thu, Nov 02, 2006 at 06:19:43PM +0800, LI Xin wrote: > > [.] > > > >> Sounds like a workaround to me and in theory that is insufficient > >> for a MPSAFE protection.

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-03 Thread MQ
2006/11/2, Brooks Davis <[EMAIL PROTECTED]>: On Thu, Nov 02, 2006 at 08:26:27AM +, . wrote: > Hi, > > I am confused by the use of inet_ntoa function in the kernel. > > The function inet_ntoa in the /sys/libkern/inet_ntoa.c uses a static array > static char buf[4 * sizeof "123"]; > to store t

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-03 Thread MQ
2006/11/2, Max Laier <[EMAIL PROTECTED]>: On Thursday 02 November 2006 09:26, . wrote: > Hi, > > I am confused by the use of inet_ntoa function in the kernel. > > The function inet_ntoa in the /sys/libkern/inet_ntoa.c uses a static > array static char buf[4 * sizeof "123"]; > to store the result

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-02 Thread Brooks Davis
On Thu, Nov 02, 2006 at 08:26:27AM +, . wrote: > Hi, > > I am confused by the use of inet_ntoa function in the kernel. > > The function inet_ntoa in the /sys/libkern/inet_ntoa.c uses a static array > static char buf[4 * sizeof "123"]; > to store the result. And it returns the address of the a

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-02 Thread Max Laier
On Thursday 02 November 2006 11:32, LI Xin wrote: > VANHULLEBUS Yvan wrote: > > On Thu, Nov 02, 2006 at 06:19:43PM +0800, LI Xin wrote: > > [.] > > > >> Sounds like a workaround to me and in theory that is insufficient > >> for a MPSAFE protection. Here is a patch which reduces the chance > >>

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-02 Thread LI Xin
VANHULLEBUS Yvan wrote: > On Thu, Nov 02, 2006 at 06:19:43PM +0800, LI Xin wrote: > [.] >> Sounds like a workaround to me and in theory that is insufficient for a >> MPSAFE protection. Here is a patch which reduces the chance where we >> get a race. > > Hi. > > This patch will allow multiple

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-02 Thread VANHULLEBUS Yvan
On Thu, Nov 02, 2006 at 06:19:43PM +0800, LI Xin wrote: [.] > Sounds like a workaround to me and in theory that is insufficient for a > MPSAFE protection. Here is a patch which reduces the chance where we > get a race. Hi. This patch will allow multiple calls to inet_ntoa int the same functi

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-02 Thread LI Xin
Max Laier wrote: > On Thursday 02 November 2006 09:26, . wrote: >> Hi, >> >> I am confused by the use of inet_ntoa function in the kernel. >> >> The function inet_ntoa in the /sys/libkern/inet_ntoa.c uses a static >> array static char buf[4 * sizeof "123"]; >> to store the result. And it returns th

Re: Reentrant problem with inet_ntoa in the kernel

2006-11-02 Thread Max Laier
On Thursday 02 November 2006 09:26, . wrote: > Hi, > > I am confused by the use of inet_ntoa function in the kernel. > > The function inet_ntoa in the /sys/libkern/inet_ntoa.c uses a static > array static char buf[4 * sizeof "123"]; > to store the result. And it returns the address of the array to

Reentrant problem with inet_ntoa in the kernel

2006-11-02 Thread .
Hi, I am confused by the use of inet_ntoa function in the kernel. The function inet_ntoa in the /sys/libkern/inet_ntoa.c uses a static array static char buf[4 * sizeof "123"]; to store the result. And it returns the address of the array to the caller. I think this inet_ntoa is not reentrant, th