tech-userlevel archive

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

Re: netbsd-7 kernel and older vnconfig(8)



    Date:        Mon, 9 Nov 2015 10:26:28 -0500
    From:        christos%zoulas.com@localhost (Christos Zoulas)
    Message-ID:  <20151109152628.A6D6417FDAB%rebar.astron.com@localhost>

  | Yes, and this works because &vnd->sc_dkdev returns the offset from NULL
  | of sc_dkdev.

Yes, I know what happens there...

  | Since the disk ioctl never touches it (dereferences it),

But I didn't go to check that, and I doubt that assuming it will always
be true (or expecting someone changing that code to know that dereferencing
the param is not safe in this case) is a very good idea.

I also don't think it can ever actually happen, that is, I don't think
just returning ENXIO in the NULL case (whatever the ioctl cmd) would do
any harm, or break anything.

kre



Home | Main Index | Thread Index | Old Index