[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix vm_map_msync

From: guy fleury iteriteka
Subject: Re: Fix vm_map_msync
Date: Fri, 30 Aug 2019 20:46:33 +0200

Le ven. 30 août 2019 à 19:53, Samuel Thibault <samuel.thibault@gnu.org> a écrit :

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.

Attachment: 0001-fix-return-KERN_INVALID_ARGUMENT-when-the-map-is-NUL.patch
Description: Text Data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]