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: <Pine.LNX.4.64.0709171153010.27542@schroedinger.engr.sgi.com>
Date:	Mon, 17 Sep 2007 12:00:07 -0700 (PDT)
From:	Christoph Lameter <clameter@....com>
To:	Andrew Morton <akpm@...ux-foundation.org>
cc:	Ethan Solomita <solo@...gle.com>, linux-mm@...ck.org, pj@....com,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 6/6] cpuset dirty limits

On Fri, 14 Sep 2007, Andrew Morton wrote:

> > +	mutex_lock(&callback_mutex);
> > +	*cs_int = val;
> > +	mutex_unlock(&callback_mutex);
> 
> I don't think this locking does anything?

Locking is wrong here. The lock needs to be taken before the cs pointer 
is dereferenced from the caller.

> > +	return 0;
> > +}
> > +
> >  /*
> >   * Frequency meter - How fast is some event occurring?
> >   *
> > ...
> > +void cpuset_get_current_ratios(int *background_ratio, int *throttle_ratio)
> > +{
> > +	int background = -1;
> > +	int throttle = -1;
> > +	struct task_struct *tsk = current;
> > +
> > +	task_lock(tsk);
> > +	background = task_cs(tsk)->background_dirty_ratio;
> > +	throttle = task_cs(tsk)->throttle_dirty_ratio;
> > +	task_unlock(tsk);
> 
> ditto?

It is required to take the task lock while dereferencing the tasks cpuset 
pointer.
-
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