This is a note to let you know that I've just added the patch titled device-dax: Fix default return code of range_parse() to the 5.10-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: device-dax-fix-default-return-code-of-range_parse.patch and it can be found in the queue-5.10 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. commit 6009650060b0677db6d67d04065f4bce03a15f68 Author: Shiyang Ruan <ruansy.fnst@xxxxxxxxxxxxxx> Date: Tue Jan 26 10:13:31 2021 +0800 device-dax: Fix default return code of range_parse() [ Upstream commit 7323fb22f05ff1d20498d267828870a5fbbaebd6 ] The return value of range_parse() indicates the size when it is positive. The error code should be negative. Signed-off-by: Shiyang Ruan <ruansy.fnst@xxxxxxxxxxxxxx> Reviewed-by: Joao Martins <joao.m.martins@xxxxxxxxxx> Link: https://lore.kernel.org/r/20210126021331.1059933-1-ruansy.fnst@xxxxxxxxxxxxxx Reported-by: Zhang Qilong <zhangqilong3@xxxxxxxxxx> Fixes: 8490e2e25b5a ("device-dax: add a range mapping allocation attribute") Signed-off-by: Dan Williams <dan.j.williams@xxxxxxxxx> Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx> diff --git a/drivers/dax/bus.c b/drivers/dax/bus.c index de7b74505e75e..c1d379bd7af33 100644 --- a/drivers/dax/bus.c +++ b/drivers/dax/bus.c @@ -1046,7 +1046,7 @@ static ssize_t range_parse(const char *opt, size_t len, struct range *range) { unsigned long long addr = 0; char *start, *end, *str; - ssize_t rc = EINVAL; + ssize_t rc = -EINVAL; str = kstrdup(opt, GFP_KERNEL); if (!str)