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]
Message-ID: <52976961.2010609@gmail.com>
Date:	Thu, 28 Nov 2013 09:03:45 -0700
From:	David Ahern <dsahern@...il.com>
To:	Jiri Olsa <jolsa@...hat.com>
CC:	linux-kernel@...r.kernel.org, Ingo Molnar <mingo@...nel.org>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Peter Zijlstra <peterz@...radead.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Mike Galbraith <efault@....de>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Arnaldo Carvalho de Melo <acme@...hat.com>
Subject: Re: [PATCHv3 3/7] perf tools: Fine tune readn function

On 11/28/13, 8:43 AM, Jiri Olsa wrote:

> -		if (ret <= 0)
> +		if ((ret <= 0) && (errno != EINTR))
>   			return ret;

I think you want:
if (ret < 0 && errno == EINTR)
	continue;

if (ret <= 0)
	return ret;

You certainly do not want ret < 0 here: ;-)

>
> -		n -= ret;
> -		buf += ret;
> +		left -= ret;
> +		buf  += ret;
>   	}
>
> -	return buf - buf_start;
> +	BUG_ON((size_t)(buf - buf_start) != n);
> +	return n;
>   }
>
>   size_t hex_width(u64 v)
>

--
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