Since ad52dcdf5de6f5f2c2ee156d93ebbb343f39e526 we return NT_STATUS_INTERNAL_ERROR for SMB2 reads and writes that were attempted to be cancelled by the client. Note that we don't attempt to cancel the IO internally, cf cancel_smb2_aio(). Instead we prepare the request state to be aware of the fact that the request was cancelled. So in aio_pwrite_smb2_done() when we the "cancelled" condition is met, before ad52dcdf5de6f5f2c2ee156d93ebbb343f39e526 we skipped sending a SMB2 response. Sine ad52dcdf5de6f5f2c2ee156d93ebbb343f39e526 we send response with an NT_STATUS_INTERNAL_ERROR error code. I guess both is wrong: the SMB2 response must reflect the result of the internal IO cancellation. As we don't cancel the IO internally, we must simply continue to process the SMB2 request and just ignore the cancel.
Created attachment 14564 [details] Patch for 4.8 and 4.9 cherry-picked from master
Comment on attachment 14564 [details] Patch for 4.8 and 4.9 cherry-picked from master LGTM for 4.9.next and 4.8.next
Re-assigning to Karolin for inclusion in 4.9.next, 4.8.next.
(In reply to Jeremy Allison from comment #3) Pushed to autobuild-v4-{9,8}-test.
(In reply to Karolin Seeger from comment #4) Pushed to both branches. Closing out bug report. Thanks!