bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RFC: [PATCH] Fix setpriority calling __task_priority() for processes


From: Samuel Thibault
Subject: Re: RFC: [PATCH] Fix setpriority calling __task_priority() for processes instead of threads.
Date: Wed, 31 Aug 2016 13:51:38 +0200
User-agent: Mutt/1.5.21+34 (58baf7c9f32f) (2010-12-30)

Svante Signell, on Wed 31 Aug 2016 13:42:58 +0200, wrote:
> On Wed, 2016-08-31 at 13:28 +0200, Samuel Thibault wrote:
> > Svante Signell, on Wed 31 Aug 2016 13:24:34 +0200, wrote:
> > > > Re-read your test again: it requests nice -19, i.e. something which is
> > > > reserved to root. No wonder you are getting a permission denied.
> > > Explain please, I get the same output also for running as root:
> > > check_setpriority: can't set priority: Permission denied
> > Then there is probably also a bug about not letting root do it. But
> > that's *another* bug.
> 
> Which is the original bug then?

You didn't say what application you are actually trying to fix, but the
issue you have shown is that task_priority returns permission denied
when change_threads is true (and I guessed you want that to work as
normal user). I just said that the test was expected to have issues
since the nice value is negative.

> Doing some more tests the priority can be set to
> a number>=0, but not negative, irrespective of being root or not...

Which is expected. So there is actually no bug for non-root.

Now, it's not normal that a root process can't use a negative number. So
investigation is needed there.

Samuel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]