[PATCH] DAC960_Release bug (2.4.x)

From: John v/d Kamp (john@connectux.com)
Date: Wed Apr 16 2003 - 04:55:51 EST


Hi,

It seems the DAC960_Release function doesn't work correctly when
DAC960_Open is called with File->f_flags has O_NONBLOCK set. This causes
BLKRRPART to fail, as an unsigned int gets decreased below 0.
The File struct passed to DAC960_Release is NULL, so in Open the counters
aren't increased, but in Release they are decreased. I've added a simple
check that prevents the decrements if the counters are 0.

Allso, I've no idea why there are two counters. It seems that the
ControllerUsageCount is only used to increment and decrement.

--
John van der Kamp, ConnecTUX


- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Wed Apr 23 2003 - 22:00:17 EST