From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Wolfgang Grandegger <wg@grandegger.com>
Cc: netdev@vger.kernel.org, linux-can@vger.kernel.org, kernel@pengutronix.de
Subject: Re: [PATCH] can: dev: fix nlmsg size calculation in can_get_size()
Date: Mon, 07 Oct 2013 16:14:36 +0200 [thread overview]
Message-ID: <5252C1CC.4060809@pengutronix.de> (raw)
In-Reply-To: <52507B7D.6030008@grandegger.com>
[-- Attachment #1: Type: text/plain, Size: 1045 bytes --]
On 10/05/2013 10:50 PM, Wolfgang Grandegger wrote:
> On 10/05/2013 09:25 PM, Marc Kleine-Budde wrote:
>> This patch fixes the calculation of the nlmsg size, by adding the missing
>> nla_total_size().
>>
>> Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
>> ---
>> Hello,
>>
>> this patch touches the rtnl_link_ops get_size() callback:
>>
>> static struct rtnl_link_ops can_link_ops __read_mostly = {
>> ...
>> .get_size = can_get_size,
>> ...
>> };
>>
>> By looking at other nlmsg size calculation I think a nla_total_size() for all
>> contributers is needed. Am I correct?
>
> Yes, seems so, nla_put() calls this code:
>
> http://lxr.free-electrons.com/source/lib/nlattr.c#L328
Is this an Acked-by? :)
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: 259 bytes --]
next prev parent reply other threads:[~2013-10-07 14:14 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-05 19:25 [PATCH] can: dev: fix nlmsg size calculation in can_get_size() Marc Kleine-Budde
2013-10-05 20:50 ` Wolfgang Grandegger
2013-10-07 14:14 ` Marc Kleine-Budde [this message]
2013-10-07 14:24 ` Wolfgang Grandegger
2013-10-07 14:26 ` Marc Kleine-Budde
2013-10-07 19:56 ` 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=5252C1CC.4060809@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=kernel@pengutronix.de \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=wg@grandegger.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;
as well as URLs for NNTP newsgroup(s).