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: <20150609095610.GA18359@gmail.com>
Date:	Tue, 9 Jun 2015 11:56:10 +0200
From:	Ingo Molnar <mingo@...nel.org>
To:	namhyung@...nel.org, adrian.hunter@...el.com, acme@...hat.com,
	hpa@...or.com, linux-kernel@...r.kernel.org, tglx@...utronix.de,
	dsahern@...il.com, jolsa@...hat.com
Cc:	linux-tip-commits@...r.kernel.org
Subject: Re: [tip:perf/core] perf tools: Protect accesses the dso rbtrees/
 lists with a rw lock


* tip-bot for Arnaldo Carvalho de Melo <tipbot@...or.com> wrote:

> +void dsos__add(struct dsos *dsos, struct dso *dso)
> +{
> +	pthread_rwlock_wrlock(&dsos->lock);
> +	__dsos__add(dsos, dso);
> +	pthread_rwlock_unlock(&dsos->lock);
>  }

Please introduce wrappers and use the kernel API names: 
read_lock()/read_unlock()/etc. (and name the mutex primitives 
mutex_lock()/unlock())

That way kernel developers will find their way around the perf locking details 
easily, and we can also use liblockdep to check locking correctness.

Thanks!

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