lkml.org 
[lkml]   [1997]   [Oct]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Possible msgsnd ATOMIC problem
   Date: 	Thu, 16 Oct 1997 21:17:19 +0200
From: Pavel Machek <pavel@Elf.mj.gts.cz>

I found following code in msg.c

/* allocate message header and text space*/
msgh = (struct msg *) kmalloc (sizeof(*msgh) + msgsz,
GFP_ATOMIC);
~~~~~~~~~~

Should not this be (in_interrupt()?GFP_ATOMIC:GFP_KERNEL), or
(msgflg & IPC_KERNEL? ... )? I really do not think message queues
should eat valuable atomic memory.

I think you're right. If you look in include/net/ipv6.h, Pedro Roque
has this little inline called gfp_any(), that should be moved into a
generic header and used in cases like the one you are pointing out.

Later,
David "Sparc" Miller
davem@caip.rutgers.edu

\
 
 \ /
  Last update: 2005-03-22 13:40    [W:3.612 / U:0.004 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site