mirror of
https://github.com/dynup/kpatch
synced 2025-04-11 03:31:20 +00:00
Add patches rebased on top of upstream 5.18.0. Integration tests for these can be ran as this: $ make PATCH_DIR="linux-5.18.0" KPATCH_BUILD_OPTS="--non-replace --sourcedir /path/to/src/linux-5.18.0" integration-slow Signed-off-by: Joe Lawrence <joe.lawrence@redhat.com>
26 lines
945 B
Diff
26 lines
945 B
Diff
diff -Nupr src.orig/drivers/tty/n_tty.c src/drivers/tty/n_tty.c
|
|
--- src.orig/drivers/tty/n_tty.c 2022-06-15 10:04:10.454915345 -0400
|
|
+++ src/drivers/tty/n_tty.c 2022-06-15 10:04:59.142148413 -0400
|
|
@@ -2213,7 +2213,7 @@ more_to_be_read:
|
|
* (note that the process_output*() functions take this lock themselves)
|
|
*/
|
|
|
|
-static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
|
|
+static ssize_t noinline kpatch_n_tty_write(struct tty_struct *tty, struct file *file,
|
|
const unsigned char *buf, size_t nr)
|
|
{
|
|
const unsigned char *b = buf;
|
|
@@ -2300,6 +2300,12 @@ break_out:
|
|
return (b - buf) ? b - buf : retval;
|
|
}
|
|
|
|
+static ssize_t __attribute__((optimize("-fno-optimize-sibling-calls"))) n_tty_write(struct tty_struct *tty, struct file *file,
|
|
+ const unsigned char *buf, size_t nr)
|
|
+{
|
|
+ return kpatch_n_tty_write(tty, file, buf, nr);
|
|
+}
|
|
+
|
|
/**
|
|
* n_tty_poll - poll method for N_TTY
|
|
* @tty: terminal device
|