When specifying the MSG_NOERROR flag, receivers can avoid returningDo you have a test case? The code should handle that
error (E2BIG) and just truncate the message text, if it is too large.
Currently, this logic is only respected when there are already pending
messages in the queue.
Fix this for the case when there are onlyNo, it is sufficient to set the message size to infinity.
receivers waiting for a msg to be sent. In order for this to work, save
the flags in the msg_receiver struct as it must be used later when
doing the pipeline send.
Also do some pipeline_send() cleanups while at it.No - please don't mix cleanups with bugfixes.
long do_msgsnd(int msqid, long mtype, void __user *mtext,^^^^^^
@@ -901,6 +907,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp, int msgfl
list_add_tail(&msr_d.r_list, &msq->q_receivers);
msr_d.r_tsk = current;
msr_d.r_msgtype = msgtyp;
+ msr_d.r_msgflg = msgflg;
msr_d.r_mode = mode;
if (msgflg & MSG_NOERROR)
msr_d.r_maxsize = INT_MAX;