[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH hurd 01/30] proc: fix NULL dereference
From: |
Justus Winter |
Subject: |
[PATCH hurd 01/30] proc: fix NULL dereference |
Date: |
Thu, 27 Nov 2014 14:18:41 +0100 |
This also restores the behavior before e9687ec4.
* proc/notify.c (do_mach_notify_dead_name): Fix NULL dereference.
---
proc/notify.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/proc/notify.c b/proc/notify.c
index b6731ae..f179423 100644
--- a/proc/notify.c
+++ b/proc/notify.c
@@ -41,6 +41,9 @@ do_mach_notify_dead_name (struct port_info *pi,
{
struct proc *p;
+ if (! pi)
+ return EOPNOTSUPP;
+
if (pi->port_right == generic_port)
{
check_dead_execdata_notify (deadport);
@@ -50,9 +53,7 @@ do_mach_notify_dead_name (struct port_info *pi,
p = (struct proc *) pi;
- if (!p
- || p->p_pi.bucket != proc_bucket
- || p->p_pi.class != proc_class)
+ if (p->p_pi.bucket != proc_bucket || p->p_pi.class != proc_class)
return EOPNOTSUPP;
if (p->p_task == deadport)
--
2.1.3
- Protected payloads for the Hurd servers, Justus Winter, 2014/11/27
- [PATCH hurd 04/30] libports: add `ports_lookup_payload' and `ports_payload_get_name', Justus Winter, 2014/11/27
- [PATCH hurd 05/30] libports: add a payload-aware intrans function, Justus Winter, 2014/11/27
- [PATCH hurd 06/30] libdiskfs: add payload-aware intrans functions, Justus Winter, 2014/11/27
- [PATCH hurd 09/30] libpager: add a payload-aware intrans function, Justus Winter, 2014/11/27