[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHk-=wg2uw09tJMKTooQBr=AJPzzLTaq95b+SSS513Gm0gy5sw@mail.gmail.com>
Date: Tue, 28 Apr 2020 09:40:21 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Rob Landley <rob@...dley.net>
Cc: Jann Horn <jannh@...gle.com>,
Andrew Morton <akpm@...ux-foundation.org>,
Christoph Hellwig <hch@....de>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux-MM <linux-mm@...ck.org>,
linux-fsdevel <linux-fsdevel@...r.kernel.org>,
Alexander Viro <viro@...iv.linux.org.uk>,
"Eric W . Biederman" <ebiederm@...ssion.com>,
Oleg Nesterov <oleg@...hat.com>,
Russell King <linux@...linux.org.uk>,
Linux ARM <linux-arm-kernel@...ts.infradead.org>,
Mark Salter <msalter@...hat.com>,
Aurelien Jacquiot <jacquiot.aurelien@...il.com>,
linux-c6x-dev@...ux-c6x.org,
Yoshinori Sato <ysato@...rs.sourceforge.jp>,
Rich Felker <dalias@...c.org>,
Linux-sh list <linux-sh@...r.kernel.org>
Subject: Re: [PATCH 2/5] coredump: Fix handling of partial writes in dump_emit()
On Tue, Apr 28, 2020 at 9:34 AM Rob Landley <rob@...dley.net> wrote:
>
> Writes to a local filesystem should never be short unless disk full/error.
Well, that code is definitely supposed to also write to pipes.
But it also has "was I interrupted" logic, which stops the core dump.
So short writes can very much happen, it's just that they also imply
that the core dump should be aborted.
So the loop seems to be unnecessary. The situations where short writes
can happen are all the same situations where we want to abort anyway,
so the loop count should probably always be just one.
The same would go for any potential network filesystem with the
traditional NFS intr-like behavior.
Linus
Powered by blists - more mailing lists