Linux-audit Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Guy Briggs <rgb@redhat.com>
To: Gao feng <gaofeng@cn.fujitsu.com>
Cc: linux-audit@redhat.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] audit: change pid to portid for audit_reply
Date: Wed, 23 Oct 2013 15:20:01 -0400	[thread overview]
Message-ID: <20131023192001.GB5059@madcap2.tricolour.ca> (raw)
In-Reply-To: <1382527523-22505-1-git-send-email-gaofeng@cn.fujitsu.com>

On Wed, Oct 23, 2013 at 07:25:23PM +0800, Gao feng wrote:
> The "pid" is not a suitable name for netlink port,
> change it to "portid".

That is already in the works:
	https://www.redhat.com/archives/linux-audit/2013-August/msg00023.html
	https://lkml.org/lkml/2013/8/20/630

May I add your Signed-off-by: to that previous patch?

> more information, please see commit
> 15e473046cb6e5d18a4d0057e61d76315230382b
> 
> Signed-off-by: Gao feng <gaofeng@cn.fujitsu.com>
> ---
>  kernel/audit.c | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/kernel/audit.c b/kernel/audit.c
> index 7b0e23a..50fdcba 100644
> --- a/kernel/audit.c
> +++ b/kernel/audit.c
> @@ -165,7 +165,7 @@ struct audit_buffer {
>  };
>  
>  struct audit_reply {
> -	int pid;
> +	int portid;
>  	struct sk_buff *skb;
>  };
>  
> @@ -487,7 +487,7 @@ int audit_send_list(void *_dest)
>  	return 0;
>  }
>  
> -struct sk_buff *audit_make_reply(int pid, int seq, int type, int done,
> +struct sk_buff *audit_make_reply(int portid, int seq, int type, int done,
>  				 int multi, const void *payload, int size)
>  {
>  	struct sk_buff	*skb;
> @@ -500,7 +500,7 @@ struct sk_buff *audit_make_reply(int pid, int seq, int type, int done,
>  	if (!skb)
>  		return NULL;
>  
> -	nlh	= nlmsg_put(skb, pid, seq, t, size, flags);
> +	nlh	= nlmsg_put(skb, portid, seq, t, size, flags);
>  	if (!nlh)
>  		goto out_kfree_skb;
>  	data = nlmsg_data(nlh);
> @@ -521,13 +521,13 @@ static int audit_send_reply_thread(void *arg)
>  
>  	/* Ignore failure. It'll only happen if the sender goes away,
>  	   because our timeout is set to infinite. */
> -	netlink_unicast(audit_sock, reply->skb, reply->pid, 0);
> +	netlink_unicast(audit_sock, reply->skb, reply->portid, 0);
>  	kfree(reply);
>  	return 0;
>  }
>  /**
>   * audit_send_reply - send an audit reply message via netlink
> - * @pid: process id to send reply to
> + * @portid: the portid of netlink socket
>   * @seq: sequence number
>   * @type: audit message type
>   * @done: done (last) flag
> @@ -538,7 +538,7 @@ static int audit_send_reply_thread(void *arg)
>   * Allocates an skb, builds the netlink message, and sends it to the pid.
>   * No failure notifications.
>   */
> -static void audit_send_reply(int pid, int seq, int type, int done, int multi,
> +static void audit_send_reply(int portid, int seq, int type, int done, int multi,
>  			     const void *payload, int size)
>  {
>  	struct sk_buff *skb;
> @@ -549,11 +549,11 @@ static void audit_send_reply(int pid, int seq, int type, int done, int multi,
>  	if (!reply)
>  		return;
>  
> -	skb = audit_make_reply(pid, seq, type, done, multi, payload, size);
> +	skb = audit_make_reply(portid, seq, type, done, multi, payload, size);
>  	if (!skb)
>  		goto out;
>  
> -	reply->pid = pid;
> +	reply->portid = portid;
>  	reply->skb = skb;
>  
>  	tsk = kthread_run(audit_send_reply_thread, reply, "audit_send_reply");
> -- 
> 1.8.3.1
> 
> --
> Linux-audit mailing list
> Linux-audit@redhat.com
> https://www.redhat.com/mailman/listinfo/linux-audit

- RGB

--
Richard Guy Briggs <rbriggs@redhat.com>
Senior Software Engineer
Kernel Security
AMER ENG Base Operating Systems
Remote, Ottawa, Canada
Voice: +1.647.777.2635
Internal: (81) 32635
Alt: +1.613.693.0684x3545

  reply	other threads:[~2013-10-23 19:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-23 11:25 [PATCH] audit: change pid to portid for audit_reply Gao feng
2013-10-23 19:20 ` Richard Guy Briggs [this message]
2013-10-24  0:42   ` Gao feng

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=20131023192001.GB5059@madcap2.tricolour.ca \
    --to=rgb@redhat.com \
    --cc=gaofeng@cn.fujitsu.com \
    --cc=linux-audit@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    /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