]> git.baikalelectronics.ru Git - kernel.git/commit
/dev/zero: fixups for ->read
authorChristoph Hellwig <hch@lst.de>
Mon, 7 Sep 2020 08:27:00 +0000 (10:27 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 7 Sep 2020 08:46:35 +0000 (10:46 +0200)
commitf4ba800bda79520cedd9cf2dfabb5823ae77df53
treeb6e2bfa2e0bd3d867228412ce203c7f589f7245f
parent30fe362414e5398888704fc3efed1b6d775ea1ef
/dev/zero: fixups for ->read

Reported the cleared bytes in case of a partial clear_user instead
of -EFAULT, and remove a pointless conditional, as cleared must be
non-zero by the time we hit the signal_pending check.

Reported-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20200907082700.2057137-1-hch@lst.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/char/mem.c