Re: check for device_lookup result in vscsi

2013-05-10 Thread Matthew Dempsky
On Fri, May 10, 2013 at 6:02 AM, Mike Belopuhov wrote: > my intention here is very simple: there's a way you should call > device_lookup and everyone has to fulfill it's part of the contract. > all our devices do, vscsi doesn't. what's the reason for it to be > one of a kind? I'm ok with adding

Re: check for device_lookup result in vscsi

2013-05-10 Thread Mike Belopuhov
On Fri, May 10, 2013 at 10:35 -0700, Matthew Dempsky wrote: > On Fri, May 10, 2013 at 6:02 AM, Mike Belopuhov wrote: > > my intention here is very simple: there's a way you should call > > device_lookup and everyone has to fulfill it's part of the contract. > > all our devices do, vscsi doesn't.

Re: check for device_lookup result in vscsi

2013-05-10 Thread Mike Belopuhov
On 10 May 2013 14:57, Gerhard Roth wrote: > Mike, > > but it does check in vscsiopen(). Hence no userland program should be > able to call vscsiioctl() for a non-existant device because the open() > already failed. At least that's true as long as vscsi devices can't > disappear during run-time. >

Re: check for device_lookup result in vscsi

2013-05-10 Thread Gerhard Roth
Mike, but it does check in vscsiopen(). Hence no userland program should be able to call vscsiioctl() for a non-existant device because the open() already failed. At least that's true as long as vscsi devices can't disappear during run-time. Gerhard On Fri, 10 May 2013 14:44:39 +0200 Mike Belop

Re: check for device_lookup result in vscsi

2013-05-10 Thread Mike Belopuhov
On Fri, May 03, 2013 at 16:19 +0200, Mike Belopuhov wrote: > hi, > > while looking for the device_unref bugs, i found that > vscsi doesn't check if device_lookup has returned a > valid return value. > > ok? > anyone? > diff --git sys/dev/vscsi.c sys/dev/vscsi.c > index 3da371c..db65642 100644

check for device_lookup result in vscsi

2013-05-03 Thread Mike Belopuhov
hi, while looking for the device_unref bugs, i found that vscsi doesn't check if device_lookup has returned a valid return value. ok? diff --git sys/dev/vscsi.c sys/dev/vscsi.c index 3da371c..db65642 100644 --- sys/dev/vscsi.c +++ sys/dev/vscsi.c @@ -296,6 +296,9 @@ vscsiioctl(dev_t dev, u_long