How to avoid "Trying to register duplicated ioctl32 handler"

From: Bagalkote, Sreenivas
Date: Thu Sep 15 2005 - 16:17:56 EST


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.

Thanks,
Sreenivas
-
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/