[<prev] [next>] [day] [month] [year] [list]
Message-ID: <f2b55d220703141820o6725215ei20048737e1a81dcc@mail.gmail.com>
Date: Wed, 14 Mar 2007 18:20:57 -0700
From: "Michael K. Edwards" <medwards.linux@...il.com>
To: "Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>
Subject: do_acct_process bypasses vfs_write?
do_acct_process (in kernel/acct.c) bypasses vfs_write and calls
file->f_op->write directly. It therefore bypasses various sanity
checks, some of which appear applicable (notably inode->i_flock &&
MANDATORY_LOCK(inode)) and others of which do not (oversize request,
access_ok, etc.). It also neglects to call
fsnotify_modify(file->f_path.dentry) after a successful write, which
may or may not matter.
Perhaps someone more knowledgeable than I could go through vfs_read
and vfs_write, distinguishing between those checks which are only
applicable to requests initiated from userspace and those which should
also be performed for in-kernel uses of f_op->read/write?
Cheers,
- Michael
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists