diff options
-rw-r--r-- | drivers/tty/n_tty.c | 2 | ||||
-rw-r--r-- | drivers/tty/tty_audit.c | 2 | ||||
-rw-r--r-- | include/linux/tty.h | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/tty/n_tty.c b/drivers/tty/n_tty.c index 13844261cd5f..ed776149261e 100644 --- a/drivers/tty/n_tty.c +++ b/drivers/tty/n_tty.c | |||
@@ -169,7 +169,7 @@ static inline int tty_copy_to_user(struct tty_struct *tty, | |||
169 | { | 169 | { |
170 | struct n_tty_data *ldata = tty->disc_data; | 170 | struct n_tty_data *ldata = tty->disc_data; |
171 | 171 | ||
172 | tty_audit_add_data(tty, to, n, ldata->icanon); | 172 | tty_audit_add_data(tty, from, n, ldata->icanon); |
173 | return copy_to_user(to, from, n); | 173 | return copy_to_user(to, from, n); |
174 | } | 174 | } |
175 | 175 | ||
diff --git a/drivers/tty/tty_audit.c b/drivers/tty/tty_audit.c index 90ca082935f6..3d245cd3d8e6 100644 --- a/drivers/tty/tty_audit.c +++ b/drivers/tty/tty_audit.c | |||
@@ -265,7 +265,7 @@ static struct tty_audit_buf *tty_audit_buf_get(struct tty_struct *tty, | |||
265 | * | 265 | * |
266 | * Audit @data of @size from @tty, if necessary. | 266 | * Audit @data of @size from @tty, if necessary. |
267 | */ | 267 | */ |
268 | void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, | 268 | void tty_audit_add_data(struct tty_struct *tty, const void *data, |
269 | size_t size, unsigned icanon) | 269 | size_t size, unsigned icanon) |
270 | { | 270 | { |
271 | struct tty_audit_buf *buf; | 271 | struct tty_audit_buf *buf; |
diff --git a/include/linux/tty.h b/include/linux/tty.h index 5b04b0a5375b..5e31f1b99037 100644 --- a/include/linux/tty.h +++ b/include/linux/tty.h | |||
@@ -607,7 +607,7 @@ extern void n_tty_inherit_ops(struct tty_ldisc_ops *ops); | |||
607 | 607 | ||
608 | /* tty_audit.c */ | 608 | /* tty_audit.c */ |
609 | #ifdef CONFIG_AUDIT | 609 | #ifdef CONFIG_AUDIT |
610 | extern void tty_audit_add_data(struct tty_struct *tty, unsigned char *data, | 610 | extern void tty_audit_add_data(struct tty_struct *tty, const void *data, |
611 | size_t size, unsigned icanon); | 611 | size_t size, unsigned icanon); |
612 | extern void tty_audit_exit(void); | 612 | extern void tty_audit_exit(void); |
613 | extern void tty_audit_fork(struct signal_struct *sig); | 613 | extern void tty_audit_fork(struct signal_struct *sig); |
@@ -615,8 +615,8 @@ extern void tty_audit_tiocsti(struct tty_struct *tty, char ch); | |||
615 | extern void tty_audit_push(struct tty_struct *tty); | 615 | extern void tty_audit_push(struct tty_struct *tty); |
616 | extern int tty_audit_push_current(void); | 616 | extern int tty_audit_push_current(void); |
617 | #else | 617 | #else |
618 | static inline void tty_audit_add_data(struct tty_struct *tty, | 618 | static inline void tty_audit_add_data(struct tty_struct *tty, const void *data, |
619 | unsigned char *data, size_t size, unsigned icanon) | 619 | size_t size, unsigned icanon) |
620 | { | 620 | { |
621 | } | 621 | } |
622 | static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) | 622 | static inline void tty_audit_tiocsti(struct tty_struct *tty, char ch) |