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



The following reply was made to PR port-amd64/55816; it has been noted by GNATS.

From: Christos Zoulas <christos%zoulas.com@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: port-amd64-maintainer%netbsd.org@localhost,
 gnats-admin%netbsd.org@localhost,
 netbsd-bugs%netbsd.org@localhost,
 "martin%netbsd.org@localhost" <martin%NetBSD.org@localhost>
Subject: Re: port-amd64/55816: mdopen() kills the kernel
Date: Sun, 22 Nov 2020 10:00:48 -0500

 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
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 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