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: <20190430090358.GL2623@hirez.programming.kicks-ass.net>
Date:   Tue, 30 Apr 2019 11:03:58 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     kan.liang@...ux.intel.com
Cc:     tglx@...utronix.de, mingo@...hat.com, linux-kernel@...r.kernel.org,
        eranian@...gle.com, tj@...nel.org, ak@...ux.intel.com
Subject: Re: [PATCH 3/4] perf cgroup: Add cgroup ID as a key of RB tree

On Mon, Apr 29, 2019 at 07:44:04AM -0700, kan.liang@...ux.intel.com wrote:
> +static struct perf_event *
> +perf_event_groups_first_cgroup(struct perf_event_groups *groups,
> +			       int cpu, u64 cgrp_id)
> +{
> +	struct perf_event *node_event = NULL, *match = NULL;
> +	struct rb_node *node = groups->tree.rb_node;
> +
> +	while (node) {
> +		node_event = container_of(node, struct perf_event, group_node);
> +
> +		if (cpu < node_event->cpu) {
> +			node = node->rb_left;
> +		} else if (cpu > node_event->cpu) {
> +			node = node->rb_right;
> +		} else {
> +			if (cgrp_id_low(cgrp_id) < cgrp_id_low(node_event->cgrp_id))
> +				node = node->rb_left;
> +			else if (cgrp_id_low(cgrp_id) > cgrp_id_low(node_event->cgrp_id))
> +				node = node->rb_right;
> +			else {
> +				match = node_event;
> +				node = node->rb_left;
> +				}
> +			}
> +		}
> +		return match;
> +}

That's whitespace challenged.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ