All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vlad Yasevich <vyasevich@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>, linux-sctp@vger.kernel.org
Cc: Ben Hutchings <bhutchings@solarflare.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH v2] sctp: Add process name and pid to deprecation warnings
Date: Fri, 03 Jan 2014 15:27:37 +0000	[thread overview]
Message-ID: <52C6D6E9.3060203@gmail.com> (raw)
In-Reply-To: <1388695167-21896-1-git-send-email-nhorman@tuxdriver.com>

On 01/02/2014 03:39 PM, Neil Horman wrote:
> Recently I updated the sctp socket option deprecation warnings to be both a bit
> more clear and ratelimited to prevent user processes from spamming the log file.
> Ben Hutchings suggested that I add the process name and pid to these warnings so
> that users can tell who is responsible for using the deprecated apis.  This
> patch accomplishes that.
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Vlad Yasevich <vyasevich@gmail.com>
> CC: Ben Hutchings <bhutchings@solarflare.com>
> CC: "David S. Miller" <davem@davemloft.net>
> CC: netdev@vger.kernel.org

Looks good to me, thanks.

Acked-by: Vlad Yasevich <vyasevich@gmail.com>


-vlad

> 
> ---
> Change Notes
> v2) Convert formatting to use  %s (%d) rather than %s (pid %d) as per request
> from Ben
> ---
>  net/sctp/socket.c | 24 ++++++++++++++++++------
>  1 file changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index e9c5121..bcc71aa 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -2579,8 +2579,10 @@ static int sctp_setsockopt_delayed_ack(struct sock *sk,
>  			return 0;
>  	} else if (optlen = sizeof(struct sctp_assoc_value)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of struct sctp_assoc_value in delayed_ack socket option.\n"
> -				    "Use struct sctp_sack_info instead\n");
> +				    "Use struct sctp_sack_info instead\n",
> +				    current->comm, task_pid_nr(current));
>  		if (copy_from_user(&params, optval, optlen))
>  			return -EFAULT;
>  
> @@ -2996,8 +2998,10 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
>  
>  	if (optlen = sizeof(int)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of int in maxseg socket option.\n"
> -				    "Use struct sctp_assoc_value instead\n");
> +				    "Use struct sctp_assoc_value instead\n",
> +				    current->comm, task_pid_nr(current));
>  		if (copy_from_user(&val, optval, optlen))
>  			return -EFAULT;
>  		params.assoc_id = 0;
> @@ -3255,8 +3259,10 @@ static int sctp_setsockopt_maxburst(struct sock *sk,
>  
>  	if (optlen = sizeof(int)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of int in max_burst socket option deprecated.\n"
> -				    "Use struct sctp_assoc_value instead\n");
> +				    "Use struct sctp_assoc_value instead\n",
> +				    current->comm, task_pid_nr(current));
>  		if (copy_from_user(&val, optval, optlen))
>  			return -EFAULT;
>  	} else if (optlen = sizeof(struct sctp_assoc_value)) {
> @@ -4577,8 +4583,10 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
>  			return -EFAULT;
>  	} else if (len = sizeof(struct sctp_assoc_value)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of struct sctp_assoc_value in delayed_ack socket option.\n"
> -				    "Use struct sctp_sack_info instead\n");
> +				    "Use struct sctp_sack_info instead\n",
> +				    current->comm, task_pid_nr(current));
>  		if (copy_from_user(&params, optval, len))
>  			return -EFAULT;
>  	} else
> @@ -5223,8 +5231,10 @@ static int sctp_getsockopt_maxseg(struct sock *sk, int len,
>  
>  	if (len = sizeof(int)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of int in maxseg socket option.\n"
> -				    "Use struct sctp_assoc_value instead\n");
> +				    "Use struct sctp_assoc_value instead\n",
> +				    current->comm, task_pid_nr(current));
>  		params.assoc_id = 0;
>  	} else if (len >= sizeof(struct sctp_assoc_value)) {
>  		len = sizeof(struct sctp_assoc_value);
> @@ -5316,8 +5326,10 @@ static int sctp_getsockopt_maxburst(struct sock *sk, int len,
>  
>  	if (len = sizeof(int)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of int in max_burst socket option.\n"
> -				    "Use struct sctp_assoc_value instead\n");
> +				    "Use struct sctp_assoc_value instead\n",
> +				    current->comm, task_pid_nr(current));
>  		params.assoc_id = 0;
>  	} else if (len >= sizeof(struct sctp_assoc_value)) {
>  		len = sizeof(struct sctp_assoc_value);
> 


WARNING: multiple messages have this Message-ID (diff)
From: Vlad Yasevich <vyasevich@gmail.com>
To: Neil Horman <nhorman@tuxdriver.com>, linux-sctp@vger.kernel.org
Cc: Ben Hutchings <bhutchings@solarflare.com>,
	"David S. Miller" <davem@davemloft.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH v2] sctp: Add process name and pid to deprecation warnings
Date: Fri, 03 Jan 2014 10:27:37 -0500	[thread overview]
Message-ID: <52C6D6E9.3060203@gmail.com> (raw)
In-Reply-To: <1388695167-21896-1-git-send-email-nhorman@tuxdriver.com>

On 01/02/2014 03:39 PM, Neil Horman wrote:
> Recently I updated the sctp socket option deprecation warnings to be both a bit
> more clear and ratelimited to prevent user processes from spamming the log file.
> Ben Hutchings suggested that I add the process name and pid to these warnings so
> that users can tell who is responsible for using the deprecated apis.  This
> patch accomplishes that.
> 
> Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
> CC: Vlad Yasevich <vyasevich@gmail.com>
> CC: Ben Hutchings <bhutchings@solarflare.com>
> CC: "David S. Miller" <davem@davemloft.net>
> CC: netdev@vger.kernel.org

Looks good to me, thanks.

Acked-by: Vlad Yasevich <vyasevich@gmail.com>


-vlad

> 
> ---
> Change Notes
> v2) Convert formatting to use  %s (%d) rather than %s (pid %d) as per request
> from Ben
> ---
>  net/sctp/socket.c | 24 ++++++++++++++++++------
>  1 file changed, 18 insertions(+), 6 deletions(-)
> 
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index e9c5121..bcc71aa 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -2579,8 +2579,10 @@ static int sctp_setsockopt_delayed_ack(struct sock *sk,
>  			return 0;
>  	} else if (optlen == sizeof(struct sctp_assoc_value)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of struct sctp_assoc_value in delayed_ack socket option.\n"
> -				    "Use struct sctp_sack_info instead\n");
> +				    "Use struct sctp_sack_info instead\n",
> +				    current->comm, task_pid_nr(current));
>  		if (copy_from_user(&params, optval, optlen))
>  			return -EFAULT;
>  
> @@ -2996,8 +2998,10 @@ static int sctp_setsockopt_maxseg(struct sock *sk, char __user *optval, unsigned
>  
>  	if (optlen == sizeof(int)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of int in maxseg socket option.\n"
> -				    "Use struct sctp_assoc_value instead\n");
> +				    "Use struct sctp_assoc_value instead\n",
> +				    current->comm, task_pid_nr(current));
>  		if (copy_from_user(&val, optval, optlen))
>  			return -EFAULT;
>  		params.assoc_id = 0;
> @@ -3255,8 +3259,10 @@ static int sctp_setsockopt_maxburst(struct sock *sk,
>  
>  	if (optlen == sizeof(int)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of int in max_burst socket option deprecated.\n"
> -				    "Use struct sctp_assoc_value instead\n");
> +				    "Use struct sctp_assoc_value instead\n",
> +				    current->comm, task_pid_nr(current));
>  		if (copy_from_user(&val, optval, optlen))
>  			return -EFAULT;
>  	} else if (optlen == sizeof(struct sctp_assoc_value)) {
> @@ -4577,8 +4583,10 @@ static int sctp_getsockopt_delayed_ack(struct sock *sk, int len,
>  			return -EFAULT;
>  	} else if (len == sizeof(struct sctp_assoc_value)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of struct sctp_assoc_value in delayed_ack socket option.\n"
> -				    "Use struct sctp_sack_info instead\n");
> +				    "Use struct sctp_sack_info instead\n",
> +				    current->comm, task_pid_nr(current));
>  		if (copy_from_user(&params, optval, len))
>  			return -EFAULT;
>  	} else
> @@ -5223,8 +5231,10 @@ static int sctp_getsockopt_maxseg(struct sock *sk, int len,
>  
>  	if (len == sizeof(int)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of int in maxseg socket option.\n"
> -				    "Use struct sctp_assoc_value instead\n");
> +				    "Use struct sctp_assoc_value instead\n",
> +				    current->comm, task_pid_nr(current));
>  		params.assoc_id = 0;
>  	} else if (len >= sizeof(struct sctp_assoc_value)) {
>  		len = sizeof(struct sctp_assoc_value);
> @@ -5316,8 +5326,10 @@ static int sctp_getsockopt_maxburst(struct sock *sk, int len,
>  
>  	if (len == sizeof(int)) {
>  		pr_warn_ratelimited(DEPRECATED
> +				    "%s (%d) "
>  				    "Use of int in max_burst socket option.\n"
> -				    "Use struct sctp_assoc_value instead\n");
> +				    "Use struct sctp_assoc_value instead\n",
> +				    current->comm, task_pid_nr(current));
>  		params.assoc_id = 0;
>  	} else if (len >= sizeof(struct sctp_assoc_value)) {
>  		len = sizeof(struct sctp_assoc_value);
> 

  reply	other threads:[~2014-01-03 15:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-02 17:54 [PATCH] sctp: Add process name and pid to deprecation warnings Neil Horman
2014-01-02 17:54 ` Neil Horman
2014-01-02 19:52 ` Ben Hutchings
2014-01-02 19:52   ` Ben Hutchings
2014-01-02 20:30   ` Neil Horman
2014-01-02 20:30     ` Neil Horman
2014-01-03  0:18     ` Ben Hutchings
2014-01-03  0:18       ` Ben Hutchings
2014-01-03  2:30       ` Neil Horman
2014-01-03  2:30         ` Neil Horman
2014-01-02 20:39 ` [PATCH v2] " Neil Horman
2014-01-02 20:39   ` Neil Horman
2014-01-03 15:27   ` Vlad Yasevich [this message]
2014-01-03 15:27     ` Vlad Yasevich
2014-01-04  0:37 ` [PATCH] " David Miller
2014-01-04  0:37   ` David Miller

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=52C6D6E9.3060203@gmail.com \
    --to=vyasevich@gmail.com \
    --cc=bhutchings@solarflare.com \
    --cc=davem@davemloft.net \
    --cc=linux-sctp@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=nhorman@tuxdriver.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.