From: Mark Brown Date: Mon, 10 Dec 2012 16:14:11 +0000 (+0900) Subject: regmap: debugfs: Avoid overflows for very small reads X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~61^2~4^2~2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=db04328c167ff8e7c57f4a3532214aeada3a82fd;p=pandora-kernel.git regmap: debugfs: Avoid overflows for very small reads If count is less than the size of a register then we may hit integer wraparound when trying to move backwards to check if we're still in the buffer. Instead move the position forwards to check if it's still in the buffer, we are unlikely to be able to allocate a buffer sufficiently big to overflow here. Signed-off-by: Mark Brown Cc: stable@vger.kernel.org --- Reading git-diff-tree failed