lkml.org 
[lkml]   [2012]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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



\
 
 \ /
  Last update: 2012-03-15 00:05    [W:0.049 / U:0.868 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site