lkml.org 
[lkml]   [2017]   [Oct]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [git pull] vfs.git regression fix Re: Regression related to ipc shmctl compat
On Tue 2017-09-26 02:00:36, Al Viro wrote:
> On Mon, Sep 25, 2017 at 03:18:29PM -0700, Kyle Huey wrote:
> > Beginning with 553f770ef71b, the following program fails when compiled
> > for 32 bit and executed on a 64 bit kernel and succeeds when compiled
> > for and executed on a 64 bit. It continues to fail even after
> > 58aff0af7573. When compiled as 32 bit, an shmctl call fails with
> > EBADR (see the XXX comment).
>
> Egads...
>
> static int put_compat_shm_info(struct shm_info *ip,
> struct compat_shm_info __user *uip)
> {
> struct compat_shm_info info;
>
> memset(&info, 0, sizeof(info));
> info.used_ids = ip->used_ids;
> info.shm_tot = ip->shm_tot;
> info.shm_rss = ip->shm_rss;
> 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));
> ^^
> This.
>
> I really wish gcc warned about conversions from pointer to function into
> void *...

up is quite short and not-specific for global symbol. Rename to mutex_up?

Pavel

\
 
 \ /
  Last update: 2017-10-15 23:59    [W:0.089 / U:0.664 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site