From: Michael Chan <michael.chan@broadcom.com>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: David Miller <davem@davemloft.net>, Netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next 2/9] bnxt_en: Add Support for ETHTOOL_GMODULEINFO and ETHTOOL_GMODULEEEPRO
Date: Sat, 14 May 2016 23:01:18 -0700 [thread overview]
Message-ID: <CACKFLinShcLykdPDUN0wBb1f10_i8MyLZXZt4jObKuZADU+ezA@mail.gmail.com> (raw)
In-Reply-To: <1463275917.2631.31.camel@decadent.org.uk>
On Sat, May 14, 2016 at 6:31 PM, Ben Hutchings <ben@decadent.org.uk> wrote:
> On Sat, 2016-05-14 at 20:29 -0400, Michael Chan wrote:
>> From: Ajit Khaparde <ajit.khaparde@broadcom.com>
> [...]
>> + /* Read A2 portion of the EEPROM */
>> + if (length) {
>> + start -= ETH_MODULE_SFF_8436_LEN;
>> + bnxt_read_sfp_module_eeprom_info(bp, I2C_DEV_ADDR_A2, 1, start,
>> + length, data + start);
>
> The output address calculation (data + start) makes no sense at all.
> If eeprom->offset < ETH_MODULE_SFF_8436_LEN then start == 0 here and
> this read overwrites earlier data in the output buffer. If
> eeeprom->offset > ETH_MODULE_SFF_8436_LEN then start > 0 here and this
> overruns the output buffer.
>
> I think that 'data' should be incremented along with 'start' in the
> previous if-block.
>
Yes, you're right. We'll fix it and resend. Thanks.
next prev parent reply other threads:[~2016-05-15 6:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-15 0:29 [PATCH net-next 0/9] bnxt_en: updates for net-next Michael Chan
2016-05-15 0:29 ` [PATCH net-next 1/9] bnxt_en: Fix invalid max channel parameter in ethtool -l Michael Chan
2016-05-15 0:29 ` [PATCH net-next 2/9] bnxt_en: Add Support for ETHTOOL_GMODULEINFO and ETHTOOL_GMODULEEEPRO Michael Chan
2016-05-15 1:31 ` Ben Hutchings
2016-05-15 6:01 ` Michael Chan [this message]
2016-05-15 0:29 ` [PATCH net-next 3/9] bnxt_en: Report PCIe link speed and width during driver load Michael Chan
2016-05-15 0:29 ` [PATCH net-next 4/9] bnxt_en: Reduce maximum ring pages if page size is 64K Michael Chan
2016-05-15 0:29 ` [PATCH net-next 5/9] bnxt_en: Improve the delay logic for firmware response Michael Chan
2016-05-15 0:29 ` [PATCH net-next 6/9] bnxt_en: Fix length value in dmesg log firmware error message Michael Chan
2016-05-15 0:29 ` [PATCH net-next 7/9] bnxt_en: Simplify and improve unsupported SFP+ module reporting Michael Chan
2016-05-15 0:29 ` [PATCH net-next 8/9] bnxt_en: Add BCM57314 device ID Michael Chan
2016-05-15 0:29 ` [PATCH net-next 9/9] bnxt_en: Use dma_rmb() instead of rmb() Michael Chan
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=CACKFLinShcLykdPDUN0wBb1f10_i8MyLZXZt4jObKuZADU+ezA@mail.gmail.com \
--to=michael.chan@broadcom.com \
--cc=ben@decadent.org.uk \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
/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).