diff --git a/README.md b/README.md index 13c8579..8117dcb 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ To exit, just do a regular: poweroff -This is particularly useful to get full panic traces when you start making the kernel crashing :-) See also: +This is particularly useful to get full panic traces when you start making the kernel crash :-) See also: If the system crashes, you can't can quit QEMU with `poweroff`, but you can use either: @@ -205,7 +205,6 @@ ARM TODOs: - Ctrl + C kills the emulator, not sent to guest. See: - - -- `fops.ko`, `printf a >fops` crashes with `BUG: recent printk recursion!` ## Table of contents diff --git a/kernel_module/fops.c b/kernel_module/fops.c index 24ec783..996964f 100644 --- a/kernel_module/fops.c +++ b/kernel_module/fops.c @@ -69,7 +69,6 @@ static ssize_t fop_write(struct file *file, const char __user *buf, size_t len, { ssize_t ret; printk(KERN_INFO "write\n"); - printk(KERN_INFO "buf = %.*s\n", (int)len, buf); printk(KERN_INFO "len = %zu\n", len); printk(KERN_INFO "off = %lld\n", (long long)*off); if (sizeof(data) <= *off) { @@ -86,6 +85,7 @@ static ssize_t fop_write(struct file *file, const char __user *buf, size_t len, } } } + printk(KERN_INFO "buf = %.*s\n", (int)len, data + *off); printk(KERN_INFO "ret = %lld\n", (long long)ret); return ret; }