On 4/27/20 10:35 PM, Linus Torvalds wrote: > On Mon, Apr 27, 2020 at 8:28 PM Jann Horn <jannh@xxxxxxxxxx> wrote: >> >> After a partial write, we have to update the input buffer pointer. > > Interesting. It seems this partial write case never triggers (except > for actually killing the core-dump). > > Or did you find a case where it actually matters? > > Your fix is obviously correct, but it also makes me go "that function > clearly never actually worked for partial writes, maybe we shouldn't > even bother?" Writes to a local filesystem should never be short unless disk full/error. Once upon a time this was yet another thing that NFS could break that no other filesystem would break, but I dunno about now? (I think the page cache collates it and defers the flush until the error can't be reported back anyway?) Rob