]> xenbits.xensource.com Git - people/julieng/linux-arm.git/commitdiff
Compiler bug workaround!!!
authorTomasz Nowicki <tomasz.nowicki@linaro.org>
Thu, 26 Mar 2015 10:07:18 +0000 (11:07 +0100)
committerJulien Grall <julien.grall@citrix.com>
Mon, 28 Sep 2015 11:05:23 +0000 (12:05 +0100)
Signed-off-by: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Signed-off-by: Robert Richter <rrichter@cavium.com>
Signed-off-by: Vadim Lomovtsev <Vadim.Lomovtsev@caviumnetworks.com>
drivers/tty/n_tty.c

index ee8bfacf20716481a23a60325b5c99ba9da35508..8ad43b57f1754f6de73a5785109176c5b0dbc662 100644 (file)
@@ -1711,6 +1711,7 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
 {
        struct n_tty_data *ldata = tty->disc_data;
        int room, n, rcvd = 0, overflow;
+       size_t *read_tail_tmp = &ldata->read_tail;
 
        down_read(&tty->termios_rwsem);
 
@@ -1728,7 +1729,7 @@ n_tty_receive_buf_common(struct tty_struct *tty, const unsigned char *cp,
                 * the consumer has loaded the data in read_buf up to the new
                 * read_tail (so this producer will not overwrite unread data)
                 */
-               size_t tail = smp_load_acquire(&ldata->read_tail);
+               size_t tail = smp_load_acquire(read_tail_tmp);
 
                room = N_TTY_BUF_SIZE - (ldata->read_head - tail);
                if (I_PARMRK(tty))