From: Cyril H. <ch...@su...> - 2015-09-09 13:10:24
|
Hi! > It doesn't seem reliable: > > open("/dev/null", O_WRONLY|O_CREAT, 0644) = 3 > write(3, NULL, 1) = 1 > close(3) = 0 > > I'm seeing this on RHEL6.7 kernel, I haven't tried latest upstream yet. Ah, you are right, the memory is not touched in the write_null() function at all. drivers/char/mem.c: static ssize_t write_null(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { return count; } -- Cyril Hrubis ch...@su... |