From: Leon Romanovsky <leon@kernel•org>
To: Felix Manlunas <felix.manlunas@cavium•com>
Cc: davem@davemloft•net, netdev@vger•kernel.org,
raghu.vatsavayi@cavium•com, derek.chickles@cavium•com,
satananda.burla@cavium•com, ricardo.farrington@cavium•com
Subject: Re: [PATCH net-next 0/3] LiquidIO: avoid VM low memory crashes
Date: Thu, 8 Jun 2017 10:12:37 +0300 [thread overview]
Message-ID: <20170608071237.GL1127@mtr-leonro.local> (raw)
In-Reply-To: <20170608035045.GA1608@felix-thinkpad.cavium.com>
[-- Attachment #1: Type: text/plain, Size: 1314 bytes --]
On Wed, Jun 07, 2017 at 08:50:45PM -0700, Felix Manlunas wrote:
> From: Rick Farrington <ricardo.farrington@cavium•com>
>
> This patchset addresses issues brought about by low memory conditions
> in a VM. These conditions were only seen when VM's were intentionally
> created with small amounts of memory (for stress testing).
>
> 1. Fix GPF in octeon_init_droq(); zero the allocated block 'recv_buf_list'.
> This prevents a GPF trying to access an invalid 'recv_buf_list[i]' entry
> in octeon_droq_destroy_ring_buffers() if init didn't alloc all entries.
> 2. Don't dereference a NULL ptr in octeon_droq_destroy_ring_buffers().
> 3. For defensive programming, zero the allocated block 'oct->droq[0]' in
> octeon_setup_output_queues() and 'oct->instr_queue[0]' in
> octeon_setup_instr_queues().
>
While these patches are harmless, I don't really understand how
allocating the same arrays just with zeros in it can prevent low memory
crashes. Once you used v[m,z]alloc, you should expect for failures in
these flows and relying on content of that page is not called "solve the
bug".
Thanks
> drivers/net/ethernet/cavium/liquidio/octeon_device.c | 8 ++++----
> drivers/net/ethernet/cavium/liquidio/octeon_droq.c | 6 ++++--
> 2 files changed, 8 insertions(+), 6 deletions(-)
>
> --
> 1.8.3.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2017-06-08 7:12 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-08 3:50 [PATCH net-next 0/3] LiquidIO: avoid VM low memory crashes Felix Manlunas
2017-06-08 3:52 ` [PATCH net-next 1/3] LiquidIO: lowmem: init allocated memory to 0 Felix Manlunas
2017-06-08 3:52 ` [PATCH net-next 2/3] LiquidIO: lowmem: do not dereference NULL ptr Felix Manlunas
2017-06-08 3:53 ` [PATCH net-next 3/3] LiquidIO: lowmem: init allocated memory to 0 Felix Manlunas
2017-06-08 7:12 ` Leon Romanovsky [this message]
2017-06-08 13:16 ` [PATCH net-next 0/3] LiquidIO: avoid VM low memory crashes 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=20170608071237.GL1127@mtr-leonro.local \
--to=leon@kernel$(echo .)org \
--cc=davem@davemloft$(echo .)net \
--cc=derek.chickles@cavium$(echo .)com \
--cc=felix.manlunas@cavium$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=raghu.vatsavayi@cavium$(echo .)com \
--cc=ricardo.farrington@cavium$(echo .)com \
--cc=satananda.burla@cavium$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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