Re: [PATCH] x86/uaccess: small optimization in unsafe_copy_to_user()
From: Linus Torvalds
Date: Sat Apr 17 2021 - 18:12:17 EST
On Sat, Apr 17, 2021 at 1:35 PM Al Viro <viro@xxxxxxxxxxxxxxxxxx> wrote:
>
> No, wait - we have non-NULL buf->prev_reclen, so we'll hit
> with buf->error completely ignored. Nevermind.
Yeah, I'm pretty sure I even tested that -EINTR case at one point.
Of course, it could easily have gotten broken again, so that's not a
strong argument.
That said, the "buf->err" handling has always been very confusing, and
it would be lovely to get rid of that confusion.
I don't remember why we did it that way, but I think it's because
low-level filesystems ended up changing the error that the filldir()
function returned or something like that.
Linus