Thread (1 message) 1 message, 1 author, 2015-05-05

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

From: Arnd Bergmann <hidden>
Date: 2015-05-05 21:40:25
Also in: lkml

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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help