From mboxrd@z Thu Jan 1 00:00:00 1970 From: Markus Armbruster Subject: Re: [PATCH 2/3] xenoprof fixes: active_domains races Date: Mon, 15 May 2006 21:15:47 +0200 Message-ID: <87psifyu8s.fsf@pike.pond.sub.org> References: <87hd3r2qst.fsf@pike.pond.sub.org> <878xp32qqf.fsf@pike.pond.sub.org> <20060515185310.GC2724@moss.sous-sol.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: In-Reply-To: <20060515185310.GC2724@moss.sous-sol.org> (Chris Wright's message of "Mon, 15 May 2006 11:53:10 -0700") List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org Chris Wright writes: > * Markus Armbruster (armbru@redhat.com) wrote: >> --- linux-2.6.16.13-xen.patched-1/drivers/oprofile/oprofile_files.c 2006-05-15 10:28:11.000000000 +0200 >> +++ linux-2.6.16.13-xen.patched-2/drivers/oprofile/oprofile_files.c 2006-05-15 10:31:11.000000000 +0200 >> @@ -128,6 +128,7 @@ static struct file_operations dump_fops >> >> unsigned int adomains = 0; >> long active_domains[MAX_OPROF_DOMAINS]; >> +static DECLARE_MUTEX(adom_sem); > > Sorry, didn't mention this earlier. Please use new mutex code here, > smth like: > > s/DECLARE_MUTEX(adom_sec)/DEFINE_MUTEX(adomain_mutex)/ > s/down(&adom_sem)/mutex_lock(&adomain_mutex)/ > s/up(&adom_sem)/mutex_unlock(&admoain_mutex)/ > > thanks, > -chris What about buffer_sem in drivers/oprofile/event_buffer.c and start_sem in drivers/oprofile/oprof.c? Want me to submit a patch to convert all three?