public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: arnd@arndb.de
Cc: netdev@vger.kernel.org, aconole@bytheb.org, edumazet@google.com,
	james.l.morris@oracle.com, linux-security-module@vger.kernel.org,
	serge@hallyn.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] af_unix: introduce unix_sk_const helper
Date: Thu, 08 Oct 2015 04:03:32 -0700 (PDT)	[thread overview]
Message-ID: <20151008.040332.1651208312284048708.davem@davemloft.net> (raw)
In-Reply-To: <10735490.HC94hyceBX@wuerfel>

From: Arnd Bergmann <arnd@arndb.de>
Date: Tue, 06 Oct 2015 22:52:46 +0200

> Commit 124613012db1 ("af_unix: Convert the unix_sk macro to an inline
> function for type safety") was recently added to catch incorrect
> uses of the unix_sk helper using compiler warnings.
> 
> It has now caught one such case in lsm_audit.c. The code is technically
> correct, but as it converts a const pointer to a non-const pointer,
> the annotation got lost, which gcc now warns about.
> 
> This patch avoids the warning by introducing an additional helper
> that has const input and output, which makes the lsm_audit code build
> cleanly again.
> 
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
> ---
> I'm not entirely happy with this workaround myself, but could not come
> up with a better one.

You can make the argument unconditionally const, as Paul Moore has done
in a separate patch submission.

  reply	other threads:[~2015-10-08 11:03 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-06 20:52 [PATCH] af_unix: introduce unix_sk_const helper Arnd Bergmann
2015-10-08 11:03 ` David Miller [this message]
2015-10-08 12:11   ` Arnd Bergmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151008.040332.1651208312284048708.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=aconole@bytheb.org \
    --cc=arnd@arndb.de \
    --cc=edumazet@google.com \
    --cc=james.l.morris@oracle.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=serge@hallyn.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox