mirror of
https://github.com/dynup/kpatch
synced 2024-12-19 20:00:00 +00:00
0c96fd0968
new-function test fails on ppc64le with the following message: create-diff-object: ERROR: n_tty.o: kpatch_no_sibling_calls_ppc64le: 3445: Found an unsupported sibling call at n_tty_write()+0x20. Add __attribute__((optimize("-fno-optimize-sibling-calls"))) to n_tty_write() definition. Add the suggested attribute, as was done for rhel-7.[5-7] versions of the test. Signed-off-by: Julien Thierry <jthierry@redhat.com>
27 lines
945 B
Diff
27 lines
945 B
Diff
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c
|
|
index 3ad4602..f3cda7e 100644
|
|
--- a/drivers/tty/n_tty.c
|
|
+++ b/drivers/tty/n_tty.c
|
|
@@ -2296,7 +2296,7 @@ static ssize_t n_tty_read(struct tty_struct *tty, struct file *file,
|
|
* 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;
|
|
@@ -2383,6 +2383,12 @@ static ssize_t n_tty_write(struct tty_struct *tty, struct file *file,
|
|
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
|