linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* msgrcv bug?
@ 2001-09-06 17:18 Andrey Ilinykh
  0 siblings, 0 replies; only message in thread
From: Andrey Ilinykh @ 2001-09-06 17:18 UTC (permalink / raw)
  To: linux-kernel

Hi!
sys_msgrcv contains such code as (ipc/msg.c): 

771                 list_del(&msg->m_list);
772                 msq->q_qnum--;
773                 msq->q_rtime = CURRENT_TIME;
774                 msq->q_lrpid = current->pid;
775                 msq->q_cbytes -= msg->m_ts;
776                 atomic_sub(msg->m_ts,&msg_bytes);
777                 atomic_dec(&msg_hdrs);
778                 ss_wakeup(&msq->q_senders,0);
779                 msg_unlock(msqid);
780 out_success:
781                 msgsz = (msgsz > msg->m_ts) ? msg->m_ts : msgsz;
782                 if (put_user (msg->m_type, &msgp->mtype) ||
783                     store_msg(msgp->mtext, msg, msgsz)) {
784                             msgsz = -EFAULT;
785                 }
786                 free_msg(msg);
787                 return msgsz;

if put_user fails (user process passed wrond address) message will not be
delivered, but it is already removed from list. So nobody will receive this
message. Is this behavior correct?
Thank you,
  Andrey
Please cc to my e-mail also.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-09-06 17:18 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-06 17:18 msgrcv bug? Andrey Ilinykh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).