IPC: fix put_compat_shm_info()
PATCH 1/1 IPC: fix put_compat_shm_info()
There's a typo in put_compat_shm_info() - the first argument of copy_to_user() is 'up' instead of 'uip'. And 'up' is occasionly a suitable variable name so the compiler doesn't complain.
Signed-off-by Yury Norov <[email protected]>
--- ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
ipc/shm.c +1 -1
@@ -1154,7 +1154,7 @@ static int put_compat_shm_info(struct shm_info *ip, info.shm_swp = ip->shm_swp; info.swap_attempts = ip->swap_attempts; info.swap_successes = ip->swap_successes; -return copy_to_user (up, &info,sizeof (info)); +return copy_to_user (uip, &info,sizeof (info)); } static int copy_compat_shmid_to_user(void __user *buf, struct shmid64_ds *in,
Signature · 1 line
2.11.0
Quoted 6 lines · Yury Norov
There's a typo in
put_compat_shm_info()- the first argument ofcopy_to_user()is 'up' instead of 'uip'. And 'up' is occasionly a suitable variable name so the compiler doesn't complain.Signed-off-by Yury Norov <[email protected]>
Ah, I just pulled latest sources and found it already fixed. Please forget.
Quoted 19 lines
--- ipc/shm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)ipc/shm.c +1
-1@@ -1154,7 +1154,7 @@ static int put_compat_shm_info(struct shm_info *ip, info.shm_swp = ip->shm_swp; info.swap_attempts = ip->swap_attempts; info.swap_successes = ip->swap_successes; -return copy_to_user (up, &info,sizeof (info)); +return copy_to_user (uip, &info,sizeof (info)); } static int copy_compat_shmid_to_user(void __user *buf, struct shmid64_ds *in,Signature · 1 line
2.11.0