Re: [PATCH 6.3 02/29] mm/mmap: Fix error return in do_vmi_align_munmap()

David Woodhouse
2023-07-03T09:24:11Z

[-- Attachment #1: Type: text/plain, Size: 1010 bytes --]

On Thu, 2023-06-29 at 20:43 +0200, Greg Kroah-Hartman wrote:
> From: David Woodhouse <dwmw@amazon.co.uk>
>
> commit 6c26bd4384da24841bac4f067741bbca18b0fb74 upstream,
>
> If mas_store_gfp() in the gather loop failed, the 'error' variable that
> ultimately gets returned was not being set. In many cases, its original
> value of -ENOMEM was still in place, and that was fine. But if VMAs had
> been split at the start or end of the range, then 'error' could be zero.
>
> Change to the 'error = foo(); if (error) goto …' idiom to fix the bug.

Hrm, that isn't what the original commit message said. It said:

> Change to the 'error = foo(); if (error) goto …' idiom to fix the bug.

This far into the 21st century, we don't see a lot of tools injecting
Mojibake any more; the mantra of "everything is UTF-8, all of the time"
mostly seems to work.

Granted, there are more important problems in the world, but it'd be
good to identify where that happened and file bugs if needed.

[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 5965 bytes --]