Re: CFR: FireWire: Don't allow a tlabel to reference an xfer after free

2013-04-04 Thread Sean Bruno
On Thu, 2013-03-28 at 11:25 -0600, Will Andrews wrote: > Diff: http://people.freebsd.org/~will/patches/fix-fwmem-use-after-free.diff > > >From the commit log: > > FireWire: Don't allow a tlabel to reference an xfer after free. > > sys/dev/firewire/firewire.c: > - fw_xfer_

extend printf(9) %b format to allow 0 bits set

2013-04-04 Thread Sean Bruno
A small patch from my wanderings today for your review. This patch to kvprintf() allows me to set a %b format string of: "\20\0unset\1ONESET\2TWOSET" In the case that the variable being compared has the value of 0, it will display "0x0" http://people.freebsd.org/~sbruno/subr_prf.txt Sean si

Re: close(2) while accept(2) is blocked

2013-04-04 Thread Andriy Gapon
on 01/04/2013 18:22 John Baldwin said the following: > I think you need to split the 'struct file' reference count into two different > counts similar to the how we have vref/vrele vs vhold/vdrop for vnodes. The > fget for accept and probably most other system calls should probably be > equivalen

Re: call suspend_cpus() under smp_ipi_mtx

2013-04-04 Thread Andriy Gapon
on 01/04/2013 17:52 John Baldwin said the following: > Hmm, I think intr_table_lock used to be a spin lock at some point. I don't > remember > why we changed it to a regular mutex. It may be that there was a lock order > reason > for that. :( I came up with the following patch: http://people.f

Re: close(2) while accept(2) is blocked

2013-04-04 Thread Andriy Gapon
on 30/03/2013 18:14 John-Mark Gurney said the following: > As someone else pointed out in this thread, if a userland program > depends upon this behavior, it has a race condition in it... > > Thread 1 Thread 2Thread 3 > ent