]> git.baikalelectronics.ru Git - kernel.git/commit
s390/qeth: fix race in used-buffer accounting
authorJulian Wiedmann <jwi@linux.ibm.com>
Thu, 19 Jul 2018 10:43:48 +0000 (12:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sat, 21 Jul 2018 17:12:29 +0000 (10:12 -0700)
commite3688e0eba309b5f0ca2efae6c1715a11e874d08
tree9c4fecc85ff313af8459d3181fedf830d9962114
parent49b41eae114571e86bd6dbb0f5a812cbc1eb9f28
s390/qeth: fix race in used-buffer accounting

By updating q->used_buffers only _after_ do_QDIO() has completed, there
is a potential race against the buffer's TX completion. In the unlikely
case that the TX completion path wins, qeth_qdio_output_handler() would
decrement the counter before qeth_flush_buffers() even incremented it.

Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/s390/net/qeth_core_main.c