Uploaded image for project: 'vpp'
  1. vpp
  2. VPP-650

fix vlib_buffer_copy(...) buffer allocation failure handling

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: High High
    • 17.04
    • 17.04
    • VPPInfra

      n_alloc = vlib_buffer_alloc (vm, new_buffers, n_buffers);
      ASSERT (n_alloc == n_buffers);
      <assume that n_alloc == n_buffers>

      Before we end up having to chase a really hard-to-repro failure (non-debug images only), let’s make vlib_buffer_copy() check n_alloc == n_buffers; free any allocated buffers and return 0 if the allocation request wasn’t satisfied in full.

      There are a few callers which need to check for NULL pointer returns: replicate_inline() in replicate_dpo.c, li_hit_node_fn() in vnet/lawful-intercept/node.c, and span_mirror() in vnet/span/node.c.

            dbarach Dave Barach
            dbarach Dave Barach
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 1 week
                1w
                Remaining:
                Time Spent - 1 day Remaining Estimate - 4 days
                4d
                Logged:
                Time Spent - 1 day Remaining Estimate - 4 days
                1d