On Thu, Mar 12, 2020 at 09:35:33PM -0300, Bruno Meneguele wrote: > Userspace libraries, e.g. glibc's dprintf(), expect the default return value > for invalid seek situations: -ESPIPE, but when the IO was over /dev/kmsg the > current state of kernel code was returning the generic case of an -EINVAL. > Hence, userspace programs were not behaving as expected or documented. > > With this patch we add SEEK_CUR case returning the expected value and also a > simple mention of it in kernel's documentation for those relying on that for > guidance. > > Signed-off-by: Bruno Meneguele <bmeneg@xxxxxxxxxx> > --- > Documentation/ABI/testing/dev-kmsg | 2 ++ > kernel/printk/printk.c | 4 ++++ > 2 files changed, 6 insertions(+) <formletter> This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read: https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html for how to do this properly. </formletter>