Re: [PATCH] ipc/sem: 64bit union semun definition

From: Arnd Bergmann
Date: Tue May 05 2015 - 17:40:29 EST


On Tuesday 05 May 2015 14:09:14 Sandy Sun wrote:
> Hi Arnd,
>
> If user space uses union semun to define.It will use semid_ds not
> semid64_ds.
>
> I used LTP test case semctl01 IPC_STAT to do the test on 64 bit
> system.According to the test results:
>
> Before the change, semun uses semid_ds, the field of sem_nsems reporting of
> semaphore STAT info is incorrect:
>
> semctl01 1 TFAIL : semaphore STAT info is incorrect
> semctl01 2 TFAIL : semaphore mode info is incorrect
>
> After this change, the return value is correct:
> semctl01 1 TPASS : buf.sem_nsems and buf.sem_perm.mode are correct
> semctl01 2 TPASS : buf.sem_perm.mode is correct

I don't understand: semctl01 does not reference 'union semun64'. How
does this change make a difference, and why would that difference
be limited to 64-bit systems?

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