Patch "pipe: fix off-by-one error when checking buffer limits" has been added to the 4.9-stable tree