A potential bug in drivers/tty/serial/jsm/jsm.ko

From: Pavel Andrianov
Date: Mon Sep 05 2016 - 05:11:19 EST


Hi!

There is a potential bug in drivers/tty/serial/jsm/jsm.ko.
In neo_parse_isr, line 764 a field ch->ch_flags is updated under spinlock protection. In neo_copy_data_from_uart_to_queue the same values are written to the field without any protection, as the function is always called without locks.
Should the same lock be used in these cases?
--
Pavel Andrianov
Linux Verification Center, ISPRAS
web: http://linuxtesting.org
e-mail: andrianov@xxxxxxxxx