tty: Convert tty->closing to int
authorPeter Hurley <peter@hurleysoftware.com>
Wed, 5 Nov 2014 17:40:04 +0000 (12:40 -0500)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 6 Nov 2014 22:57:27 +0000 (14:57 -0800)
tty->closing is a bitfield member; prevent corruption from non-atomic
update by assigning a unique memory location.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/tty.h

index c52a689e09aa8fc609b715e37a1b808f6c31ce79..7d66ae508e5cc08c0ba8f91b09e55224a565f04d 100644 (file)
@@ -284,7 +284,7 @@ struct tty_struct {
 
 #define N_TTY_BUF_SIZE 4096
 
-       unsigned char closing:1;
+       int closing;
        unsigned char *write_buf;
        int write_cnt;
        /* If the tty has a pending do_SAK, queue it here - akpm */