[PATCH] do_write_mem() return value check
From: BlaisorBlade <blaisorblade_spam@yahoo.it>, and me - remove unused `file *' arg from do_write_mem() - Add checking for copy_from_user() failures in do_write_mem() - Return correct value from kmem writes() when a fault is encountered. A write()-style syscall's return values are: 0 when nothing was written and there was no error (someone tried to write zero bytes) >0: the number of bytes copied, whether or not there was an error. Userspace detects errors by noting that the write() return value is less than was requested. <0: there was an error and no bytes were copied
Showing
Please register or sign in to comment