The new PT_IO ptrace(2) request doesn't work, since it doesn't release
a lock.  Since PT_IO is similar to PT_READ_D/PT_WRITE_D, I copied the
PROC_UNLOCK from there and inserted in the same location.  Patch,
against version 1.103 of sys_process.c, attached.

This patch is also available as:

   http://members.chello.nl/~m.m.kettenis/FreeBSD/5-current/pt_io.patch.

A bug report was filed using send-pr.  It has ID kern/44065.

Mark

P.S. GDB will soon use this request for its data transfers if it is
     available.  Really helps with large data transfers :-).  Would be
     great if this problem would be fixed first though.  We don't want
     GDB crashing the kernel, don't we ;-).

--- /usr/src/sys/kern/sys_process.c.orig        Wed Sep 11 10:13:54 2002
+++ /usr/src/sys/kern/sys_process.c     Mon Oct 14 23:22:01 2002
@@ -647,6 +647,7 @@ kern_ptrace(struct thread *td, int req, 
                return (error);
 
        case PT_IO:
+               PROC_UNLOCK(p);
                piod = addr;
                iov.iov_base = piod->piod_addr;
                iov.iov_len = piod->piod_len;


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to