On 12/20/2012 03:54 AM, John Stultz wrote:
So I'd suggest instead to make your test consistent with the kernel, rather then the other way around.
This makes no sense if the kernel itself is buggy :-).
Again, the root of evil is a bug in http://linux-arm.org/git?p=linux-2.6-armdroid.git%3Ba=shortlog%3Bh=refs/head... (k.org mainline has no such bug). I've tried to fix it, but this causes ABI break. So, if we can't change ASHMEM_GET_PIN_STATUS encoding, then this code is obviously wrong: ... case _IOC_NR(ASHMEM_PIN): case _IOC_NR(ASHMEM_UNPIN): case _IOC_NR(ASHMEM_GET_PIN_STATUS): if (_IOC_SIZE(cmd) != sizeof(struct ashmem_pin)) pr_err("ashmem: ASHMEM_PIN transaction size differs\n"); ... (because it assumes that sizeof(struct ashmem_pin) is encoded into ASHMEM_GET_PIN_STATUS).
Serban, the code above was introduced at:
http://linux-arm.org/git?p=linux-2.6-armdroid.git%3Ba=commit%3Bh=43632e1f149...
Dmitry