NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-amd64/55816: mdopen() kills the kernel



I looked in the whole tree for cf_unit comparisons < 0 or -1 and could not find any.
I wonder if the following would work.

christos

Index: device.h
===================================================================
RCS file: /cvsroot/src/sys/sys/device.h,v
retrieving revision 1.158
diff -u -p -u -r1.158 device.h
--- device.h    3 Oct 2020 22:32:50 -0000       1.158
+++ device.h    22 Nov 2020 15:00:16 -0000
@@ -279,8 +279,8 @@ struct cfparent {
 struct cfdata {
        const char *cf_name;            /* driver name */
        const char *cf_atname;          /* attachment name */
-       short   cf_unit;                /* unit number */
-       short   cf_fstate;              /* finding state (below) */
+       unsigned int cf_unit:24;        /* unit number */
+       unsigned char cf_fstate;        /* finding state (below) */
        int     *cf_loc;                /* locators (machine dependent) */
        int     cf_flags;               /* flags from config */
        const struct cfparent *cf_pspec;/* parent specification */



Home | Main Index | Thread Index | Old Index