[Top] [All Lists]

Re: [RFC][PATCH] MIPS: VPE: Remove vpe_getuid and vpe_getgid

To: "Eric W. Biederman" <>
Subject: Re: [RFC][PATCH] MIPS: VPE: Remove vpe_getuid and vpe_getgid
From: "Steven J. Hill" <>
Date: Tue, 21 Jan 2014 14:29:05 -0600
Cc: <>, <>, Deng-Cheng Zhu <>
In-reply-to: <>
List-archive: <>
List-help: <>
List-id: linux-mips <>
List-owner: <>
List-post: <>
List-software: Ecartis version 1.0.0
List-subscribe: <>
List-unsubscribe: <>
Original-recipient: rfc822;
References: <>
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0
On 01/21/2014 12:42 PM, Eric W. Biederman wrote:

The linux build-bot recently reported a build error in arch/mips/kernel/vpe.c

      head:   261000a56b6382f597bcb12000f55c9ff26a1efb
      commit: 261000a56b6382f597bcb12000f55c9ff26a1efb [4/4] userns:  userns: 
      config: make ARCH=mips maltaaprp_defconfig

      All error/warnings:

         arch/mips/kernel/vpe.c: In function 'vpe_open':
      >> arch/mips/kernel/vpe.c:1086:9: error: incompatible types when 
assigning to type 'unsigned int' from type 'kuid_t'
      >> arch/mips/kernel/vpe.c:1087:9: error: incompatible types when 
assigning to type 'unsigned int' from type 'kgid_t'

      vim +1086 arch/mips/kernel/vpe.c

      863abad4 Jesper Juhl   2010-10-30  1080                   return -ENOMEM;
      863abad4 Jesper Juhl   2010-10-30  1081           }
      e01402b1 Ralf Baechle  2005-07-14  1082           v->plen = P_SIZE;
      e01402b1 Ralf Baechle  2005-07-14  1083           v->load_addr = NULL;
      e01402b1 Ralf Baechle  2005-07-14  1084           v->len = 0;
      e01402b1 Ralf Baechle  2005-07-14  1085
      d76b0d9b David Howells 2008-11-14 @1086           v->uid = 
      d76b0d9b David Howells 2008-11-14 @1087           v->gid = 
      2600990e Ralf Baechle  2006-04-05  1088
      2600990e Ralf Baechle  2006-04-05  1089           v->cwd[0] = 0;
      2600990e Ralf Baechle  2006-04-05  1090           ret = getcwd(v->cwd, 

When examining the code to see what v->uid and v->gid were used for I
discovered that the only users in the kernel are vpe_getuid and
vpe_getgid, and that vpe_getuid and vpe_getgid are never called.

So instead of proposing a conversion to use kuid_t and kgid_t instead
of unsigned int/int as I normally would let's just kill this dead code
so no one has to worry about it further.

Cc: Ralf Baechle <>
Signed-off-by: "Eric W. Biederman" <>

This patch looks good to me, however, Deng-Cheng should also confirm if this patch is okay. He is currently maintaining that code. Thanks.


<Prev in Thread] Current Thread [Next in Thread>