From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754268AbbI3Qbq (ORCPT ); Wed, 30 Sep 2015 12:31:46 -0400 Received: from mail-qg0-f52.google.com ([209.85.192.52]:36274 "EHLO mail-qg0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752352AbbI3Qbl (ORCPT ); Wed, 30 Sep 2015 12:31:41 -0400 From: Paul Moore To: Rasmus Villemoes Cc: Stephen Smalley , Eric Paris , James Morris , "Serge E. Hallyn" , selinux@tycho.nsa.gov, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH 2/5] selinux: remove pointless cast in selinux_inode_setsecurity() Date: Wed, 30 Sep 2015 12:31:39 -0400 Message-ID: <2233926.skpAMzzEuY@sifl> User-Agent: KMail/4.14.10 (Linux/4.1.5-gentoo; KDE/4.14.12; x86_64; ; ) In-Reply-To: <1443220459-11042-3-git-send-email-linux@rasmusvillemoes.dk> References: <1443220459-11042-1-git-send-email-linux@rasmusvillemoes.dk> <1443220459-11042-3-git-send-email-linux@rasmusvillemoes.dk> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Saturday, September 26, 2015 12:34:16 AM Rasmus Villemoes wrote: > security_context_to_sid() expects a const char* argument, so there's > no point in casting away the const qualifier of value. > > Signed-off-by: Rasmus Villemoes > --- > security/selinux/hooks.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Applied. > diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c > index fd50cd5ac2ec..5edb57df86f8 100644 > --- a/security/selinux/hooks.c > +++ b/security/selinux/hooks.c > @@ -3162,7 +3162,7 @@ static int selinux_inode_setsecurity(struct inode > *inode, const char *name, if (!value || !size) > return -EACCES; > > - rc = security_context_to_sid((void *)value, size, &newsid, GFP_KERNEL); > + rc = security_context_to_sid(value, size, &newsid, GFP_KERNEL); > if (rc) > return rc; -- paul moore www.paul-moore.com