]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
bcache: Fix an error code in bch_dump_read()
authorDan Carpenter <dan.carpenter@oracle.com>
Tue, 3 Sep 2019 13:25:44 +0000 (21:25 +0800)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 14 Feb 2020 05:29:37 +0000 (00:29 -0500)
commitf77b76a50dbb5a7df1bbab4924ce65c61b326251
tree8a5b81cf1d4a341cdfdbabebf3cafa2b7486c6a5
parent2a2f7fb3c1277a8552b213a94d86079cbd4bd29d
bcache: Fix an error code in bch_dump_read()

BugLink: https://bugs.launchpad.net/bugs/1863019
[ Upstream commit d66c9920c0cf984cf99cab5036fd5f3a1b7fba46 ]

The copy_to_user() function returns the number of bytes remaining to be
copied, but the intention here was to return -EFAULT if the copy fails.

Fixes: cafe56359144 ("bcache: A block layer cache")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Coly Li <colyli@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/md/bcache/debug.c