diff mbox series

[hurd,commited] hurd: Also turn KERN_INVALID_ADDRESS to EINVAL

Message ID 20201219175850.3093692-1-samuel.thibault@ens-lyon.org
State New
Headers show
Series [hurd,commited] hurd: Also turn KERN_INVALID_ADDRESS to EINVAL | expand

Commit Message

Samuel Thibault Dec. 19, 2020, 5:58 p.m. UTC
When e.g. mmap is passed an invalid address we would return
KERN_INVALID_ADDRESS, while POSIX applications would expect EINVAL.
---
 hurd/hurd.h | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/hurd/hurd.h b/hurd/hurd.h
index c6e88a63c2..5fa7be5add 100644
--- a/hurd/hurd.h
+++ b/hurd/hurd.h
@@ -66,6 +66,7 @@  __hurd_fail (error_t err)
       err = (error_t) ENOMEM;
       break;
 
+    case KERN_INVALID_ADDRESS:
     case KERN_INVALID_ARGUMENT:
       err = (error_t) EINVAL;
       break;