cfs_user_write() calls filp->f_op->write() which does not check the
mode of filp. Call vfs_write() instead.
Signed-off-by: John L. Hammond <jhammond@tacc.utexas.edu>
Change-Id: I0cbb2e88d813fe53ce9d625c4299fc5277d246f5
Reviewed-on: http://review.whamcloud.com/4824
Reviewed-by: Keith Mannthey <keith.mannthey@intel.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
fs = get_fs();
set_fs(KERNEL_DS);
while ((ssize_t)count > 0) {
- size = filp->f_op->write(filp, (char *)buf, count, offset);
+ size = vfs_write(filp, (const char __user *)buf, count, offset);
if (size < 0)
break;
count -= size;