From: Rostislav Lisovy <lisovy@gmail.com>
To: Oliver Hartkopp <socketcan@hartkopp.net>
Cc: netdev@vger.kernel.org, linux-can@vger.kernel.org,
lartc@vger.kernel.org, pisa@cmp.felk.cvut.cz,
sojkam1@fel.cvut.cz
Subject: Re: [PATCH net-next] em_canid: Ematch rule to match CAN frames according to their identifiers
Date: Mon, 02 Jul 2012 16:12:55 +0200 [thread overview]
Message-ID: <1341238375.11881.16.camel@lolumad> (raw)
In-Reply-To: <4FEDCD42.8010203@hartkopp.net>
Hello Oliver;
On Fri, 2012-06-29 at 17:44 +0200, Oliver Hartkopp wrote:
> What about a zero length check here?
>
> if (!len)
> return -EINVAL;
>
>
> The length could alternatively be checked here too
>
> http://lxr.linux.no/#linux+v3.4.4/net/sched/ematch.c#L235
>
> if em->ops->datalen is set.
>
> But here's no
>
> .datalen = sizeof(struct can_filter),
>
> defined, right?
>
The main reason I didn't define the tcf_ematch_ops.datalen field is
because the documentation says it is "length of expected configuration
data" (not "minimal").
For the sake of possible future changes of the built-in length checking,
I will do the check by myself -- I will add the zero-length check (at
least all checks will be at the same place).
Regards;
Rostislav
prev parent reply other threads:[~2012-07-02 14:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-28 17:07 [PATCH net-next] em_canid: Ematch rule to match CAN frames according to their identifiers Rostislav Lisovy
2012-06-29 15:44 ` Oliver Hartkopp
2012-07-02 5:04 ` Oliver Hartkopp
2012-07-02 14:12 ` Rostislav Lisovy [this message]
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=1341238375.11881.16.camel@lolumad \
--to=lisovy@gmail.com \
--cc=lartc@vger.kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pisa@cmp.felk.cvut.cz \
--cc=socketcan@hartkopp.net \
--cc=sojkam1@fel.cvut.cz \
/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