mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Ross Zwisler <ross.zwisler@linux.intel.com>
To: linux-kernel@vger.kernel.org
Cc: Ross Zwisler <ross.zwisler@linux.intel.com>,
	Konstantin Khlebnikov <koct9i@gmail.com>,
	Andrew Morton <akpm@linux-foundation.org>,
	linux-nvdimm@ml01.01.org,
	Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Dmitry Vyukov <dvyukov@google.com>
Subject: [PATCH v2 0/3] 'slot' can be NULL in radix_tree_next_slot()
Date: Mon, 15 Aug 2016 13:42:34 -0600	[thread overview]
Message-ID: <20160815194237.25967-1-ross.zwisler@linux.intel.com> (raw)

This adds comments above radix_tree_next_slot() documenting the combination
of factors that prevent us from dereferencing a NULL 'slot' pointer.  It
also adds a radix tree unit test so that we can easily catch any unhandled
NULL pointer issues with radix_tree_next_slot().

Changes from V1:
 - Instead of adding an explicit check for 'slot' being NULL at the
   beginning of radix_tree_next_slot(), document what factors are keeping
   us safe instead.  (Konstantin)

Ross Zwisler (3):
  radix-tree: 'slot' can be NULL in radix_tree_next_slot()
  radix-tree tests: add iteration test
  radix-tree tests: properly initialize mutex

 include/linux/radix-tree.h                 |   8 ++
 tools/testing/radix-tree/Makefile          |   3 +-
 tools/testing/radix-tree/iteration_check.c | 180 +++++++++++++++++++++++++++++
 tools/testing/radix-tree/main.c            |   1 +
 tools/testing/radix-tree/regression1.c     |   2 +-
 tools/testing/radix-tree/test.h            |   1 +
 6 files changed, 193 insertions(+), 2 deletions(-)
 create mode 100644 tools/testing/radix-tree/iteration_check.c

-- 
2.9.0

             reply	other threads:[~2016-08-15 19:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-15 19:42 Ross Zwisler [this message]
2016-08-15 19:42 ` [PATCH v2 1/3] radix-tree: " Ross Zwisler
2016-08-15 19:42 ` [PATCH v2 2/3] radix-tree tests: add iteration test Ross Zwisler
2016-08-15 19:42 ` [PATCH v2 3/3] radix-tree tests: properly initialize mutex Ross Zwisler

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=20160815194237.25967-1-ross.zwisler@linux.intel.com \
    --to=ross.zwisler@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=aryabinin@virtuozzo.com \
    --cc=dvyukov@google.com \
    --cc=koct9i@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nvdimm@ml01.01.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

all inboxes | Powered by JetHome®