When /sys/tools/vnode_if.awk creates vnode_if.c from a template,
it does never check the lock state of **vpp. (This is the indirect
result of the double indirection required to store the vnode 
pointer as a side-effect of the function.)

The following simple patch fixes vnode_if.awk:

Index: /sys/tools/vnode_if.awk
===================================================================
RCS file: /usr/cvs/src/sys/tools/vnode_if.awk,v
retrieving revision 1.37
diff -u -r1.37 vnode_if.awk
--- /sys/tools/vnode_if.awk     26 Sep 2002 04:48:43 -0000      1.37
+++ /sys/tools/vnode_if.awk     31 Dec 2002 13:37:20 -0000
@@ -65,6 +65,8 @@
 
 function add_debug_code(name, arg, pos)
 {
+       if (arg == "vpp")
+               arg = "*vpp";
        if (lockdata[name, arg, pos]) {
                printh("\tASSERT_VI_UNLOCKED("arg", \""uname"\");");
                # Add assertions for locking

(An alternative fix would be to specify locking for vpp in the form
"#% *vpp L L L" instead of "#% vpp L L L". This requires a small change 
to the regular expression in line 171 (permit optional leading "*" for $2) 
and the removal of the name mangling in line 174f ...)

Any objections against me commiting the proposed patch ?

Regards, STefan

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

Reply via email to