Messages in this thread | | | Date | Thu, 15 Mar 2012 00:02:47 +0100 (CET) | From | Thomas Gleixner <> | Subject | Re: [REGRESSION][PATCH] mqueue: Ignore the validity of abs_timeout parameter when message can be performed immediately |
| |
B1;2601;0cOn Wed, 14 Mar 2012, Andrew Morton wrote: > On Fri, 02 Mar 2012 16:42:35 +0900 > Akira Takeuchi <takeuchi.akr@jp.panasonic.com> wrote: > > @@ -996,6 +1015,10 @@ SYSCALL_DEFINE5(mq_timedreceive, mqd_t, mqdes, char __user *, u_msg_ptr, > > if (filp->f_flags & O_NONBLOCK) { > > spin_unlock(&info->lock); > > ret = -EAGAIN; > > + } else if (unlikely(timeout_param_error)) { > > + spin_unlock(&info->lock); > > + ret = timeout_param_error; > > + msg_ptr = NULL; /* just for shutting up warning */
Huch? We are not "just" shutting up some warning because the compiler is yelling at us. No, either we initialize the variable upfront to NULL or we skip the whole return path by going to fput directly.
Duh, that code is convoluted enough already.
Thanks,
tglx
| |