Skip to contentSkip to conversation

Add missing accounting calls to compat_sys_{readv,writev}.

PATCH Superseded Gerd Hoffmann 1 participant 1 message Dec 12, 2008 VFS

v1 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add missing accounting calls to compat_sys_{readv,writev}.

$subject says all.

---
 fs/compat.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
fs/compat.c +6 -0
index 3a25cf3..e28014a 100644
@@ -1187,6 +1187,9 @@ compat_sys_readv(unsigned long fd, const struct compat_iovec __user *vec, unsign
 	ret = compat_do_readv_writev(READ, file, vec, vlen, &file->f_pos);
 
 out:
+	if (ret > 0)
+		add_rchar(current, ret);
+	inc_syscr(current);
 	fput(file);
 	return ret;
 }
@@ -1210,6 +1213,9 @@ compat_sys_writev(unsigned long fd, const struct compat_iovec __user *vec, unsig
 	ret = compat_do_readv_writev(WRITE, file, vec, vlen, &file->f_pos);
 
 out:
+	if (ret > 0)
+		add_wchar(current, ret);
+	inc_syscw(current);
 	fput(file);
 	return ret;
 }
Signature · 1 line
1.5.6.5