* [PATCH] IPC: fix put_compat_shm_info()
@ 2017-09-27 0:32 Yury Norov
2017-09-27 0:49 ` Yury Norov
0 siblings, 1 reply; 2+ messages in thread
From: Yury Norov @ 2017-09-27 0:32 UTC (permalink / raw)
To: Andrew Morton, Al Viro, linux-kernel; +Cc: Yury Norov
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 <ynorov@caviumnetworks.com>
---
ipc/shm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ipc/shm.c b/ipc/shm.c
index 1e2b1692ba2c..badac463e2c8 100644
--- a/ipc/shm.c
+++ b/ipc/shm.c
@@ -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,
--
2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] IPC: fix put_compat_shm_info()
2017-09-27 0:32 [PATCH] IPC: fix put_compat_shm_info() Yury Norov
@ 2017-09-27 0:49 ` Yury Norov
0 siblings, 0 replies; 2+ messages in thread
From: Yury Norov @ 2017-09-27 0:49 UTC (permalink / raw)
To: Andrew Morton, Al Viro, linux-kernel
On Wed, Sep 27, 2017 at 03:32:54AM +0300, Yury Norov wrote:
> 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 <ynorov@caviumnetworks.com>
Ah, I just pulled latest sources and found it already fixed.
Please forget.
> ---
> ipc/shm.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/ipc/shm.c b/ipc/shm.c
> index 1e2b1692ba2c..badac463e2c8 100644
> --- a/ipc/shm.c
> +++ b/ipc/shm.c
> @@ -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,
> --
> 2.11.0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-09-27 0:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-27 0:32 [PATCH] IPC: fix put_compat_shm_info() Yury Norov
2017-09-27 0:49 ` Yury Norov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®