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.
Done!
> - 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