lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 May 2011 14:23:48 -0400
From:	Steven Rostedt <rostedt@...dmis.org>
To:	Vaibhav Nagarnaik <vnagarnaik@...gle.com>
Cc:	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...hat.com>, linux-kernel@...r.kernel.org,
	Michael Rubin <mrubin@...gle.com>,
	David Sharp <dhsharp@...gle.com>
Subject: Re: [PATCH] trace: Add a free on close control mechanism for
 buffer_size_kb

On Thu, 2011-05-26 at 11:00 -0700, Vaibhav Nagarnaik wrote:
> On Wed, May 25, 2011 at 8:29 PM, Steven Rostedt <rostedt@...dmis.org> wrote:

> >
> > What you should do is just check if ret is less than zero here.
> >
> >        if (ret < 0)
> >                ret = -ENOMEM;
> 
> Instead, I don't have to check/set the return value. I can just return
> "ret" to the caller.

Actually, ret could be -1, if we end up with a miss match in global vs
max buffers. But that is more of an anomaly. Maybe the solution there is
to have that return -ENOMEM as well?

-- Steve


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ