kpatch/test/integration/centos-7/new-function.patch
Joe Lawrence 11ce8102c2 testing: add and rebase integration tests for CentOS 7
Kernel version: 3.10.0-327.36.3.el7.x86_64
2016-12-16 16:06:28 -05:00

26 lines
821 B
Diff

diff -Nupr src.orig/drivers/tty/n_tty.c src/drivers/tty/n_tty.c
--- src.orig/drivers/tty/n_tty.c 2016-11-30 19:51:03.562178250 +0000
+++ src/drivers/tty/n_tty.c 2016-11-30 19:53:18.852178250 +0000
@@ -2016,7 +2016,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;
@@ -2098,6 +2098,12 @@ break_out:
return (b - buf) ? b - buf : retval;
}
+static ssize_t 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