All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Oliver Hartkopp <socketcan@hartkopp.net>, linux-can@vger.kernel.org
Cc: eric.dumazet@gmail.com, alexander.h.duyck@redhat.com
Subject: Re: [PATCH] net: add comment for sock_efree() usage
Date: Tue, 10 Mar 2015 20:55:23 +0100	[thread overview]
Message-ID: <54FF4C2B.5000607@pengutronix.de> (raw)
In-Reply-To: <1426007997-6219-1-git-send-email-socketcan@hartkopp.net>

[-- Attachment #1: Type: text/plain, Size: 1262 bytes --]

On 03/10/2015 06:19 PM, Oliver Hartkopp wrote:
> In opposite to sock_rfree() and sock_wfree() the function sock_efree() does
> not need to change the sk_[rw]_mem_alloc length. Add the comment to point out
> the idea for using sock_efree() in the _e_rror handler or e.g. timestamp path.
> 
> Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
> ---
>  net/core/sock.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/net/core/sock.c b/net/core/sock.c
> index 93c8b20..7a1eac8 100644
> --- a/net/core/sock.c
> +++ b/net/core/sock.c
> @@ -1655,6 +1655,10 @@ void sock_rfree(struct sk_buff *skb)
>  }
>  EXPORT_SYMBOL(sock_rfree);
>  
> +/*
> + * Buffer destructor for skbs that don't have sk_[rw]_mem_alloc accounting.
> + * E.g. error handler / timestamp path. Automatically called from kfree_skb.
> + */

/* multiline comments in net
 * work this
 * way
 */

>  void sock_efree(struct sk_buff *skb)
>  {
>  	sock_put(skb->sk);
> 

Marc
-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2015-03-10 19:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-10 17:19 [PATCH] net: add comment for sock_efree() usage Oliver Hartkopp
2015-03-10 17:29 ` Alexander Duyck
2015-03-10 17:39   ` Oliver Hartkopp
2015-03-10 17:50     ` Alexander Duyck
2015-03-10 19:55 ` Marc Kleine-Budde [this message]
  -- strict thread matches above, loose matches on Subject: below --
2015-03-10 18:03 Oliver Hartkopp
2015-03-10 18:32 ` Alexander Duyck
2015-03-10 20:12 ` 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=54FF4C2B.5000607@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=alexander.h.duyck@redhat.com \
    --cc=eric.dumazet@gmail.com \
    --cc=linux-can@vger.kernel.org \
    --cc=socketcan@hartkopp.net \
    /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.