mirror of https://github.com/dynup/kpatch
26 lines
918 B
Diff
26 lines
918 B
Diff
|
diff -Nupr src.orig/drivers/tty/n_tty.c src/drivers/tty/n_tty.c
|
||
|
--- src.orig/drivers/tty/n_tty.c 2024-04-18 14:12:03.376375315 -0400
|
||
|
+++ src/drivers/tty/n_tty.c 2024-04-18 14:12:48.938276292 -0400
|
||
|
@@ -2298,7 +2298,7 @@ static ssize_t n_tty_read(struct tty_str
|
||
|
* 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;
|
||
|
@@ -2385,6 +2385,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
|