[lkml]   [2019]   [Jan]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [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!

 \ /
  Last update: 2019-01-14 20:15    [W:0.076 / U:1.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site