The HyperNews Linux KHG Discussion Pages

Question: possible bug in ipc/msg.c

Forum: The Linux Kernel Hackers' Guide
Keywords: ipc bug msg
Date: Sat, 21 Mar 1998 04:57:44 GMT
From: Michael Adda <[email protected]>

first, i hope that this is the right place, :-> ,
since i an not sure about the 'finding' ...
i need an advice. i am currently reading the kernel's code
systematiclay, and i believe i stumbled into a bug in ipc/msg.c lines 326,329. i am talking about kernel 2.0.30-2.0.33 ( which i am working with ) and not about the development kernels... please read the relevent code ...
since we are no longer ( between this lines ) in atomic operations, someone can suspend are in say line 326, recieve the current message ( the one we have nmsg as pointer to ) and leave us with pointer to garbage...
i belive that we should put lines 326-329 in cli/restoreflags() pair after checking that the message is valid via the pointer flag ( not IPC_UNUSED/IPC_NOOID ).
i hope that i am not bothering you for nothing...
i have a possible patch.
    thank you for your time
      Michael ( [email protected] )