X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=drivers%2Ftty%2Ftty_buffer.c;h=75661641f5fe068237e7830acd9472383964da3a;hb=1d1d14da12e79a6c05fbe1a975401f0f56c93316;hp=3605103fc1ac6d891f255fea127f6fbd8b6ad96b;hpb=6f51ee709e4c6b56f2c2a071da2d056a109b9d26;p=firefly-linux-kernel-4.4.55.git diff --git a/drivers/tty/tty_buffer.c b/drivers/tty/tty_buffer.c index 3605103fc1ac..75661641f5fe 100644 --- a/drivers/tty/tty_buffer.c +++ b/drivers/tty/tty_buffer.c @@ -557,3 +557,9 @@ int tty_buffer_set_limit(struct tty_port *port, int limit) return 0; } EXPORT_SYMBOL_GPL(tty_buffer_set_limit); + +/* slave ptys can claim nested buffer lock when handling BRK and INTR */ +void tty_buffer_set_lock_subclass(struct tty_port *port) +{ + lockdep_set_subclass(&port->buf.lock, TTY_LOCK_SLAVE); +}