summaryrefslogtreecommitdiffstats
path: root/kernel/reboot.c
diff options
context:
space:
mode:
authorUrsula Braun <ubraun@linux.ibm.com>2019-02-04 13:44:45 +0100
committerDavid S. Miller <davem@davemloft.net>2019-02-04 18:11:19 +0100
commitb8649efad879c69c7ab1f19ce8814fcabef1f72b (patch)
treec5f16db7dbde8bb5da8db0b74f538a2a58c78036 /kernel/reboot.c
parentnet/smc: preallocated memory for rdma work requests (diff)
downloadlinux-b8649efad879c69c7ab1f19ce8814fcabef1f72b.tar.xz
linux-b8649efad879c69c7ab1f19ce8814fcabef1f72b.zip
net/smc: fix sender_free computation
In some scenarios a separate consumer cursor update is necessary. The decision is made in smc_tx_consumer_cursor_update(). The sender_free computation could be wrong: The rx confirmed cursor is always smaller than or equal to the rx producer cursor. The parameters in the smc_curs_diff() call have to be exchanged, otherwise sender_free might even be negative. And if more data arrives local_rx_ctrl.prod might be updated, enabling a cursor difference between local_rx_ctrl.prod and rx confirmed cursor larger than the RMB size. This case is not covered by smc_curs_diff(). Thus function smc_curs_diff_large() is introduced here. If a recvmsg() is processed in parallel, local_tx_ctrl.cons might change during smc_cdc_msg_send. Make sure rx_curs_confirmed is updated with the actually sent local_tx_ctrl.cons value. Fixes: e82f2e31f559 ("net/smc: optimize consumer cursor updates") Signed-off-by: Ursula Braun <ubraun@linux.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'kernel/reboot.c')
0 files changed, 0 insertions, 0 deletions