2019-06-14 08:53:57 +00:00
|
|
|
Index: kernel-rhel7/drivers/tty/n_tty.c
|
|
|
|
===================================================================
|
|
|
|
--- kernel-rhel7.orig/drivers/tty/n_tty.c
|
|
|
|
+++ kernel-rhel7/drivers/tty/n_tty.c
|
|
|
|
@@ -2128,7 +2128,7 @@ do_it_again:
|
|
|
|
* 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;
|
|
|
|
@@ -2210,6 +2210,12 @@ break_out:
|
|
|
|
return (b - buf) ? b - buf : retval;
|
|
|
|
}
|
|
|
|
|
2019-07-22 21:07:22 +00:00
|
|
|
+static ssize_t __attribute__((optimize("-fno-optimize-sibling-calls"))) n_tty_write(struct tty_struct *tty, struct file *file,
|
2019-06-14 08:53:57 +00:00
|
|
|
+ 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
|