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:	Fri, 27 Jun 2014 17:07:52 -0600
From:	David Ahern <dsahern@...il.com>
To:	Jiri Olsa <jolsa@...nel.org>, linux-kernel@...r.kernel.org
CC:	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Corey Ashford <cjashfor@...ux.vnet.ibm.com>,
	Frederic Weisbecker <fweisbec@...il.com>,
	Ingo Molnar <mingo@...nel.org>,
	Jean Pihet <jean.pihet@...aro.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH 08/18] perf tools: Flush ordered events in case of allocation
 failure

On 6/18/14, 8:58 AM, Jiri Olsa wrote:
> +	case OEQ_FLUSH__HALF:
> +	{
> +		struct ordered_event *first, *last;
> +		struct list_head *head = &q->events;
> +
> +		first = list_entry(head->next, struct ordered_event, list);
> +		last = q->last;
> +
> +		if (WARN_ONCE(!last || list_empty(head), "empty queue"))
> +			return 0;

Maybe a comment that the WARN_ONCE can only happen if perf can't 
allocate an ordered event the first time through?

> +
> +		q->next_flush  = first->timestamp;
> +		q->next_flush += (last->timestamp - first->timestamp) / 2;
> +		break;
> +	}
> +


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