Re: Linux loop device driver bug (and fix)

Alexander Kjeldaas (astor@guardian.no)
Tue, 20 Oct 1998 17:48:07 +0200


On Tue, Oct 20, 1998 at 04:22:58PM +0200, Thomas Horsten wrote:
> Hi, this is my first mail to the list so excuse me if I sound stupid.
>
> I have no idea about how to submit bugfixes so I try here :)
>
> I've written an RC5 encryption driver for the loopback device but I
> encountered a bug in the loop.c driver. It calls the "release_transfer"
> function whenever a file access to the device is closed, but it should
> only call it when the device is unset.
>
> This is quite obviously a bug since the corresponding init function is
> only called when the device is configured. If the release function is
> called in the file_operations release function my module has no way of
> knowing it's use count.
>

This has been fixed in Alan Cox' prepatches and in the international
kernel patch. If you look at the latter, you'll see that the crypto
loop modules use a new API. You should probably update your patch to
use this new API.

When you've finished your driver I'd be happy to include it in the
international kernel patch, available at:

ftp://ftp.kerneli.org/pub/linux/kernel/v2.1/patch-int-2.1.125.2.gz

astor

-- 
 Alexander Kjeldaas, Guardian Networks AS, Trondheim, Norway
 http://www.guardian.no/

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