[lkml]   [2008]   [Aug]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [patch] IA64: suppress return value of down_trylock() in salinfo_work_to_do()
On Sun, Aug 03, 2008 at 12:08:08PM +1000, Keith Owens wrote:
> >task A acquires sem
> >
> >task B tries to acquire the sem, fails
> >task B releases the sem that it didn't acquire
> >
> >task A releases the sem, falls down, goes boom?
> Cannot happen. See the comment above the function:
> This routine must be called with data_saved_lock held, to make the down/up
> operation atomic

... that requres one to know that salinfo_work_to_do() is the only place
which calls up() (and it always calls down_trylock first). This is a
really creative misuse of semaphores.

Intel are signing my paycheques ... these opinions are still mine
"Bill, look, we understand that you're interested in selling us this
operating system, but compare it to ours. We can't possibly take such
a retrograde step."

 \ /
  Last update: 2008-08-03 04:47    [W:0.037 / U:4.000 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site