Fix wrong argument to allproc_scan in elf_brand_inuse()
authorYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Tue, 13 Dec 2011 21:44:37 +0000 (06:44 +0900)
committerYONETANI Tomokazu <y0netan1@dragonflybsd.org>
Tue, 13 Dec 2011 21:56:29 +0000 (06:56 +0900)
the callback expects data to be the address of elf_brand_inuse_info
but the caller passed something else.  this fixes kernel panic upon
`kldunload linux'.

sys/kern/imgact_elf.c

index 4c84950..b8de412 100644 (file)
@@ -188,7 +188,7 @@ __elfN(brand_inuse)(Elf_Brandinfo *entry)
 
        info.rval = FALSE;
        info.entry = entry;
-       allproc_scan(elf_brand_inuse_callback, entry);
+       allproc_scan(elf_brand_inuse_callback, &info);
        return (info.rval);
 }