Re: Concerns in kern/subr_kobj.c

2017-04-17 Thread Paul Goyette
On Mon, 17 Apr 2017, Christos Zoulas wrote: In article , Paul Goyette wrote: -=-=-=-=-=- On Mon, 17 Apr 2017, Paul Goyette wrote: While perusing the code, I noticed some possible issues: 1. In kobj_unload() the

Re: Power-cycle a usb port

2017-04-17 Thread Emmanuel Dreyfus
On Mon, Apr 17, 2017 at 07:03:51AM +, co...@sdf.org wrote: > > In the meantime, I found this that claims to work from userland > > https://github.com/codazoda/hub-ctrl.c > pkgsrc/devel/libusb :-) Except it needs some tweaks, as it does not see any usb hub on NetBSD. -- Emmanuel Dreyfus

Re: Concerns in kern/subr_kobj.c

2017-04-17 Thread Paul Goyette
On Mon, 17 Apr 2017, Paul Goyette wrote: While perusing the code, I noticed some possible issues: 1. In kobj_unload() the calls to kobj_machdep() for data and rodata sections are conditional on the appropriate ko->ko_xxx_address being non-zero, yet the corresponding call for the text

Re: Power-cycle a usb port

2017-04-17 Thread coypu
On Mon, Apr 17, 2017 at 12:40:58AM +, Emmanuel Dreyfus wrote: > On Mon, Apr 17, 2017 at 12:01:38AM +0300, Jukka Marin wrote: > > I know that there exists hardware that can not control the USB port power > > supply. At least in the non-laptop world. > > In the meantime, I found this that

Re: Power-cycle a usb port

2017-04-17 Thread Jukka Marin
On Sun, Apr 16, 2017 at 01:56:32PM +, Emmanuel Dreyfus wrote: > Hello > > I already asked the question hidden at the end of another message [1]: > can we power-cycle a USB port? My understanding is that we have no way > of doing it from userland, but what about from kernel? Even if the

preserve dvp lock and ref in VOP_REMOVE/VOP_RMDIR

2017-04-17 Thread Taylor R Campbell
The attached patch changes VOP_REMOVE and VOP_RMDIR so that they neither unlock nor release the directory vnode. Except for rename, these are the last two directory operations that still vput dvp -- all the others (lookup, create, link, mkdir, ) have been changed to stop doing that. These still