]> git.baikalelectronics.ru Git - kernel.git/commit
[PATCH] v9fs: make conv functions to check for conv buffer overflow
authorLatchesar Ionkov <lucho@ionkov.net>
Fri, 23 Sep 2005 04:43:48 +0000 (21:43 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 23 Sep 2005 05:17:33 +0000 (22:17 -0700)
commit585ab02208c340916589333a2db5d3d34c0a004e
treec98595f83201adcd791ef9d3509aa1f157f3dfa2
parent8a113adcdfe72220da3850f56381cc00d7199381
[PATCH] v9fs: make conv functions to check for conv buffer overflow

buf_check_size function checks if the conv buffer has enough space for the
performed operation, but it doesn't return the result back to the calling
function, only logs an error in the log.

The report-back-error functionality was lost when buf_check_size was
converted from macro to inline function. The return in the macro used to
exit from the functions that include it, after the conversion it just exits
from the inline function itself.

The patch makes buf_check_size to return flag and all functions that use
it check if they should perform the operation, or exit.

Signed-off-by: Latchesar Ionkov <lucho@ionkov.net>
Cc: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
fs/9p/conv.c