Re: cdrecord deadlocks linux 2.6.8.1 (problem in setscheduler)

From: Stephen Smalley (sds@private)
Date: Wed Oct 20 2004 - 13:05:13 PDT


On Wed, 2004-10-20 at 13:41, Chris Wright wrote:
> Unfortunately, policy < 0 is not really POSIX compliant, but it's
> documented behaviour, so changing this would change the ABI, and could
> break something.  Otherwise, the simplest would be remove that bit
> altogether.  Don't think we need to hold lock while sampling the value,
> since it should be processor word-sized value, nothing odd on loading
> should happen.  It's possible to loop and recheck, but w/out convincing
> oneself that livelock is not possible, -EPERM and return seems quite
> valid for this very unlikely case.  Untested patch below.

Works for me.  However, the test may be overly strong, e.g. if policy >=
0 on entry, then oldpolicy isn't used, and we don't care whether it
stayed the same, right?

-- 
Stephen Smalley <sds@private>
National Security Agency



This archive was generated by hypermail 2.1.3 : Wed Oct 20 2004 - 13:09:25 PDT