[lkml]   [2005]   [May]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] tty races

On Tue, 3 May 2005, Andrew Morton wrote:

> > > We want to move away from lock_kernel()-based locking.
> > >
> >
> > I completely agree, but unfortunately lock_kernel() is currently used
> > extensively throughout the tty layer.
> Well no - it's being migrated over to use tty_sem. We shouldn't start
> heading in the reverse direction. Plus your patch reverts part of
> in ways which might be unsafe.

The patch I proposed does not add any lock_kernel() based locking. The
only locking it adds is more tty_sem based locking to cover the
driver->open() method. I agree though that it relies on the BKL for

Indeed, that is precisely that patch which introduced the problems I've
pointed out.

> > lock_kernel() is used extensively throughout the tty layer. We can
> > re-write the locking for the layer, but I'd like to see this bug fix in
> > 2.6.12, if that isn't done in time.
> Sorry, but AFAICT all you have done is to advocate for the existing patch
> without having attempted to fix this problem with tty_sem. Please try to
> come up with a tty_sem-based fix.

The patch I proposed fixes the open vs. open race using the tty_sem. The
open vs. close race is closed by removing locking. Less locking seems
better to me.

If you're still not happy, I'll wrap the close path in the tty_sem...



To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-05-04 03:17    [W:0.044 / U:5.472 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site