if (down_interruptible(&fibptr->event_wait) == 0) {
fibptr->done = 2;
up(&fibptr->event_wait);
}
would make me feel much more comfortable ... The fib can never be
'freed'. The fib is owned by the adapter until it completes it on it's
own (if ever, the assumption here is that the adapter is misbehaving
on this 'one' fib). Setting the value of 2 allows us to report back to
the ioctl caller a failed operation without actually closing out the
fib.
I am having a problem with my bandwidth right now to do a unit test to
see if this gets the job done.
Sincerely -- Mark Salyzyn
On Apr 10, 2008, at 5:29 PM, Andrew Morton wrote:
On Thu, 10 Apr 2008 17:19:23 -0400
Mark Salyzyn <Mark_Salyzyn@xxxxxxxxxxx> wrote:
Until the epiphany that solves this problem or someone straightens me
out on the proper usage, I suggest a STRONG comment be added: /*
BADCODE DO NOT COPY */ :-)
There must be _some_ way of handling it which vaguely reflects what
the
code is actually trying to do.
I assume that what you're saying is that *fibptr is about to be
freed (or
reinitialised) whether or not the down_interruptible() succeeded.
If it gets freed with the lock held, CONFIG_DEBUG_LOCK_ALLOC could
(should)
generate a runtime warning.
Even something like
/*
* lavish comment goes here
*/
if (down_interruptible(&fibptr->event_wait) == 0)
up(&fibptr->event_wait);
would fix the compile-time and runtime warnings.
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html