]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
mei: revamp read and write length checks
authorTomas Winkler <tomas.winkler@intel.com>
Mon, 2 Sep 2013 00:11:04 +0000 (03:11 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 26 Sep 2013 15:23:01 +0000 (08:23 -0700)
commitdd5de1f165ade430357960459491a067c7e3d21c
tree456a28f27a8945b1025325cc2cf76a59b257c616
parente19555ce893f7567c7a72f91dafe6bdb93f0198f
mei: revamp read and write length checks

1. Return zero on zero length read and writes
2. For a too large write return -EFBIG as defined in man write(2)
EFBIG  An attempt was made to write a file that
        exceeds the implementation-defined maximum
        file size or the process's file size limit,
        or to  write  at  a  position  past  the  maximum
        allowed offset.

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/mei/main.c