From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935281AbcHJSbl (ORCPT ); Wed, 10 Aug 2016 14:31:41 -0400 Received: from mga03.intel.com ([134.134.136.65]:42510 "EHLO mga03.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753398AbcHJSbj (ORCPT ); Wed, 10 Aug 2016 14:31:39 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.28,500,1464678000"; d="scan'208";a="1033189054" Date: Wed, 10 Aug 2016 08:52:06 -0600 From: Ross Zwisler To: Konstantin Khlebnikov Cc: Ross Zwisler , Linux Kernel Mailing List , Andrew Morton , linux-nvdimm@ml01.01.org, Andrey Ryabinin , Dmitry Vyukov Subject: Re: [PATCH 1/3] radix-tree: 'slot' can be NULL in radix_tree_next_slot() Message-ID: <20160810145206.GA17734@linux.intel.com> References: <20160808185747.21028-1-ross.zwisler@linux.intel.com> <20160809152707.GA14291@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.2 (2016-07-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 10, 2016 at 09:29:23AM +0300, Konstantin Khlebnikov wrote: > On Tue, Aug 9, 2016 at 6:27 PM, Ross Zwisler > wrote: > > On Mon, Aug 08, 2016 at 10:21:39PM +0300, Konstantin Khlebnikov wrote: > > <> > >> NAK. This is fast path and it's already bloated. > >> I want to revert most changes here and rework "multiorder" entries. > >> > >> Here you can find almost ready patchset for that > >> https://github.com/koct9i/linux/commits/radix-tree > > > > Okay...are you okay with the second 2 patches in the series? They stand > > alone, and I believe are both good to have. > > They looks good. Cool, can I interpret that as an Acked-by for my v2? :) > If you're worried about complicated paths - I'll add comment for > *_next_slot() about that. Yea, if we can document the exact ways in which we're protected from not dereferencing a NULL 'slot', that would be great. I think it essentially boils down to: 1) For tagged iteration, if 'slot' is NULL then iter->tags must be cleared 2) For non-tagged iteration, it 'slot' is NULL then radix_tree_chunk_size(iter) must return 1 or less.