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, 07 Aug 2009 13:45:24 +0200
From:	Peter Zijlstra <a.p.zijlstra@...llo.nl>
To:	Markus Metzger <markus.t.metzger@...el.com>
Cc:	linux-kernel@...r.kernel.org, mingo@...e.hu, tglx@...utronix.de,
	hpa@...or.com, markus.t.metzger@...il.com, oleg@...hat.com
Subject: Re: [patch] x86, perf_counter, bts: add bts to perf_counter

On Fri, 2009-08-07 at 09:22 +0200, Markus Metzger wrote:
> @@ -721,9 +903,13 @@ static int __hw_perf_counter_init(struct
>         err = 0;
>         if (!atomic_inc_not_zero(&active_counters)) {
>                 mutex_lock(&pmc_reserve_mutex);
> -               if (atomic_read(&active_counters) == 0 && !reserve_pmc_hardware())
> -                       err = -EBUSY;
> -               else
> +               if (atomic_read(&active_counters) == 0) {
> +                       if (!reserve_pmc_hardware())
> +                               err = -EBUSY;
> +                       else
> +                               reserve_bts_hardware();
> +               }
> +               if (!err)
>                         atomic_inc(&active_counters);
>                 mutex_unlock(&pmc_reserve_mutex);
>         }

You loose the reserve_bts_hardware() error case there.

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