Date: Wed, 11 Jul 2001 19:16:11 -0400 (EDT) From: Evan Sarmiento <kaworu@sektor7.ath.cx> To: freebsd-hackers@freebsd.org Subject: pfind() question Message-ID: <200107112316.TAA27608@mail1.javanet.com>
next in thread | raw e-mail | index | archive | help
Hello, I have a small dilema. My module finds a pointer to a specific proc structure by calling pfind(pid). It then makes changes to that process structure and returns 0. However, when I try and use this seemingly simple code, it core dumps. This is the actual panic message: [teqnix](~/work/jailuser/current/src/sys/compile/KAWORU)%gdb -k kernel.debug /home/kaworu/vmcore.0 GNU gdb 4.18 Copyright 1998 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "i386-unknown-freebsd"... SMP 0 cpus IdlePTD 27757 initial pcb at 332d00 panic messages: --- dmesg: kvm_read: invalid address (c032a380) --- cannot read proc pointer at ff800004 And here's my code: int prfw_setflags(p, uap) struct proc *p; struct prfw_setflags_r *uap; { register struct proc *nproc; ... if (uap->id) { if((nproc = pfind(uap->id)) == NULL) return (0); } ... nproc->p_flag |= P_JAILED; } Am I allowed to change information in this proc structure? Thanks a lot, Evan Sarmiento To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200107112316.TAA27608>