All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kamal Heib <kamalh@mellanox.com>
To: Or Gerlitz <gerlitz.or@gmail.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>,
	Linux Netdev List <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Yevgeny Kliteynik <kliteyn@mellanox.com>
Subject: Re: [net 3/6] net/mlx5: FPGA, return -EINVAL if size is zero
Date: Thu, 09 Nov 2017 09:43:31 +0200	[thread overview]
Message-ID: <1510213411.16499.2.camel@mellanox.com> (raw)
In-Reply-To: <CAJ3xEMikKDeUDdXPn9gjKB_iL8itSyz_Q5U6Y+UrKZ6E6SCHrw@mail.gmail.com>

On Wed, 2017-11-08 at 23:13 +0900, Or Gerlitz wrote:
> On Wed, Nov 8, 2017 at 4:21 PM, Saeed Mahameed <saeedm@mellanox.com>
> wrote:
> > From: Kamal Heib <kamalh@mellanox.com>
> > 
> > In the current code, if a size of zero is passed to
> > mlx5_fpga_mem_{read|write}_i2c() functions the "err"
> 
> Don't we need to fix the call site where zero size is provided and
> not
> in called function?
> 
Isn't sending down a zero size a sign for a bug which we are not
fixing?
> 
Both functions are called from an exported symbols. so I think the size
validation should be within this two functions just like the case of
checking that mdev isn't set.


> > return value will not initialized.
> > 
> > Fixes: a9956d35d199 ('net/mlx5: FPGA, Add SBU infrastructure')
> > Signed-off-by: Kamal Heib <kamalh@mellanox.com>
> > Reviewed-by: Yevgeny Kliteynik <kliteyn@mellanox.com>
> > Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>

  reply	other threads:[~2017-11-09  7:43 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-08  7:21 [pull request][net 0/6] Mellanox, mlx5 fixes 2017-11-08 Saeed Mahameed
2017-11-08  7:21 ` [net 1/6] net/mlx5: Loop over temp list to release delay events Saeed Mahameed
2017-11-08  7:21 ` [net 2/6] net/mlx5: Cancel health poll before sending panic teardown command Saeed Mahameed
2017-11-08 14:28   ` Or Gerlitz
2017-11-08  7:21 ` [net 3/6] net/mlx5: FPGA, return -EINVAL if size is zero Saeed Mahameed
2017-11-08 14:13   ` Or Gerlitz
2017-11-09  7:43     ` Kamal Heib [this message]
2017-11-09  9:12       ` Or Gerlitz
2017-11-10  6:13         ` Saeed Mahameed
2017-11-10  6:23           ` Or Gerlitz
2017-11-10  6:37             ` Saeed Mahameed
2017-11-09  9:13       ` Or Gerlitz
2017-11-08  7:21 ` [net 4/6] net/mlx5e: Fix napi poll with zero budget Saeed Mahameed
2017-11-08  7:21 ` [net 5/6] net/mlx5e: Set page to null in case dma mapping fails Saeed Mahameed
2017-11-08  7:21 ` [net 6/6] net/mlx5e: Increase Striding RQ minimum size limit to 4 multi-packet WQEs Saeed Mahameed

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=1510213411.16499.2.camel@mellanox.com \
    --to=kamalh@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=gerlitz.or@gmail.com \
    --cc=kliteyn@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=saeedm@mellanox.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.