[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fix vm_map_msync
From: |
Samuel Thibault |
Subject: |
Re: Fix vm_map_msync |
Date: |
Fri, 30 Aug 2019 19:53:04 +0200 |
User-agent: |
NeoMutt/20170609 (1.8.3) |
Hello,
guy fleury iteriteka, le ven. 30 août 2019 19:15:33 +0200, a ecrit:
> See if this patch is good!
I don't understand why it should be needed?
> - if (map == VM_MAP_NULL)
> - KERN_INVALID_ARGUMENT;
> + if (map == VM_MAP_NULL)
> + return KERN_INVALID_ARGUMENT;
Please be simpler in the change log, at first sight I didn't understand
what you wanted to do. Here, simply use "add missing return keyword".
Change logs have two parts: the rational, then the changes. Don't
confuse both, we really need them both for different reasons. Here the
rationale is what you sid: fix returning KERN_INVALID_ARGUMENT when the
map is NULL. And the changes is adding the return keyword.
> - if (sync_flags & (VM_SYNC_ASYNCHRONOUS | VM_SYNC_SYNCHRONOUS) ==
> - (VM_SYNC_ASYNCHRONOUS | VM_SYNC_SYNCHRONOUS))
> - KERN_INVALID_ARGUMENT;
> +
> + if (sync_flags & (VM_SYNC_ASYNCHRONOUS | VM_SYNC_SYNCHRONOUS))
> + return KERN_INVALID_ARGUMENT;
This is not the same, and not what we want. What we want is to exclude
having both flags.
Samuel
- Fix vm_map_msync, guy fleury iteriteka, 2019/08/30
- Re: Fix vm_map_msync,
Samuel Thibault <=