[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20190114191418.GG17906@uranus.lan>
Date: Mon, 14 Jan 2019 22:14:18 +0300
From: Cyrill Gorcunov <gorcunov@...il.com>
To: Matthew Wilcox <willy@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH]: xarray: Fix potential out of bounds access
On Mon, Jan 14, 2019 at 11:01:20AM -0800, Matthew Wilcox wrote:
> On Mon, Jan 14, 2019 at 09:47:41PM +0300, Cyrill Gorcunov wrote:
> > Since the mark is used as an array index we should use
> > preincrement to not access the XA_MARK_MAX index.
>
> But XA_MARK_MAX is inclusive:
>
> include/linux/xarray.h:#define XA_MARK_MAX XA_MARK_2
Indeed, I misread the variable name.
> so we actually want to access XA_MARK_MAX. Now, we don't have a test
> in the test-suite that fails as a result of your patch, so that needs to get
> fixed. How about this:
Looks great. Thank you!
Powered by blists - more mailing lists