Re: [PATCH] [suggestion] mm/gup: avoid IS_ERR_OR_NULL
From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2023-05-27 09:52:19
Also in:
linux-mm, linux-perf-users, lkml
From: Jason Gunthorpe <jgg@nvidia.com>
Date: 2023-05-27 09:52:19
Also in:
linux-mm, linux-perf-users, lkml
On Sat, May 20, 2023 at 10:12:40AM +0100, Lorenzo Stoakes wrote:
quoted
No, this returning 0 on failure is a foot gun. Failing to pin a single page is always an error, the only question is what sub reason caused the error to happen. There is no third case where it is not an error.The uprobe path thinks otherwise, but maybe the answer is that we just need to -EFAULT on missing VMA and -EPERM on invalid flags.
I think uprobe is just broken to think there is a third outcome. Let's just fix it instead of trying to pretend it makes sense. Jason _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel