]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
nfs: disallow duplicate pages in pgio page vectors
authorWeston Andros Adamson <dros@primarydata.com>
Thu, 14 Aug 2014 21:39:32 +0000 (17:39 -0400)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Fri, 22 Aug 2014 22:04:44 +0000 (18:04 -0400)
commitbba5c1887a925a9945d22217d38d58d8b3ba1043
tree9326421cb1b32538ae194287eb0614faf7f50089
parent7c3af975257383ece54b83c0505d3e0656cb7daf
nfs: disallow duplicate pages in pgio page vectors

Adjacent requests that share the same page are allowed, but should only
use one entry in the page vector. This avoids overruning the page
vector - it is sized based on how many bytes there are, not by
request count.

This fixes issues that manifest as "Redzone overwritten" bugs (the
vector overrun) and hangs waiting on page read / write, as it waits on
the same page more than once.

This also adds bounds checking to the page vector with a graceful failure
(WARN_ON_ONCE and pgio error returned to application).

Reported-by: Toralf Förster <toralf.foerster@gmx.de>
Signed-off-by: Weston Andros Adamson <dros@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
fs/nfs/pagelist.c