Re: [RFC][PATCH] nbd driver for 2.5+: fix locking issues with ioctl UI

Christoph Hellwig (hch@infradead.org)
Wed, 25 Jun 2003 16:55:13 +0100


On Wed, Jun 25, 2003 at 09:36:50AM -0600, Lou Langholtz wrote:
> I have also attached a patch to Pavel's nbd-2.0 release nbd tools that
> updates the nbd-client to work with linux 2.5 as well as 2.5.74
> (assuming the aforementioned patch 6.1 made it into 2.5.74). Handling is
> switched at compile time however and uses <linux/version.h> to do the
> switching. This will have problems of course if the builder doesn't pay
> close attention to where there header file are coming from or tries to
> run the same binary on a different kernel release. Etc.

That's broken. You must make sure that a binary works with different
kernels or at least make it fail gracefully. Using <linux/version.h>
from userspace is absolutely not acceptable, just don't use kernel headers
at all but a local copy of <linux/nbd.h>.

-
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/