Re: How to avoid "Trying to register duplicated ioctl32 handler"

From: 'Christoph Hellwig'
Date: Sat Sep 17 2005 - 04:30:28 EST


On Thu, Sep 15, 2005 at 05:17:29PM -0400, Bagalkote, Sreenivas wrote:
> In our MegaRAID driver, one of the IOCTLs is defined as
> #define MEGASAS_IOC_GET_AEN _IOW('M', 2, struct megasas_aen)
>
> This clashes with some other value in "built_in" ioctl table on x86_64
> kernels.
> How do I really avoid such problems in the future. Even if I search the
> length
> of the built_in table and pick a unique value, is it guaranteed to be unique
> in
> the future releases? The Documentation/ioctl-number.txt isn't of much help
> either.
> It lists multiple conflicts. Moreover, not all of them are listed there.
>
> On a broader note, if the struct ioctl_trans inside ioctl32_hash_table could
> use the combination of cmd + major number instead of just cmd to determine
> the
> uniqueness, these conflicts could be avoided, right? I mean understand the
> reasons
> for system-wide unique ioctl numbers. But right now, only those platforms
> that
> need conversion are technically impeded for violating that guideline.

Cou can't avoid the clashes in the hash. That's why we got rid of
user-registerable ioctl translations completely and only allow ->compat_ioctl
anymore.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/