2016-01-21 21:38:38

by Jaap Jan Meijer

[permalink] [raw]
Subject: [PATCH] Fix failing ioctl set flags from x86 user space to x64 kernel

From: meijjaa <[email protected]>

Signed-off-by: meijjaa <[email protected]>
---
drivers/bluetooth/hci_ldisc.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c
index 96bcec5..c0eeda0 100644
--- a/drivers/bluetooth/hci_ldisc.c
+++ b/drivers/bluetooth/hci_ldisc.c
@@ -774,6 +774,7 @@ static int __init hci_uart_init(void)
hci_uart_ldisc.read = hci_uart_tty_read;
hci_uart_ldisc.write = hci_uart_tty_write;
hci_uart_ldisc.ioctl = hci_uart_tty_ioctl;
+ hci_uart_ldisc.compat_ioctl = hci_uart_tty_ioctl;
hci_uart_ldisc.poll = hci_uart_tty_poll;
hci_uart_ldisc.receive_buf = hci_uart_tty_receive;
hci_uart_ldisc.write_wakeup = hci_uart_tty_wakeup;
--
2.7.0


2016-01-21 21:53:56

by kernel test robot

[permalink] [raw]
Subject: Re: [PATCH] Fix failing ioctl set flags from x86 user space to x64 kernel

Hi meijjaa,

[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on v4.4 next-20160121]
[if your patch is applied to the wrong git tree, please drop us a note to help improving the system]

url: https://github.com/0day-ci/linux/commits/J-J-Meijer/Fix-failing-ioctl-set-flags-from-x86-user-space-to-x64-kernel/20160122-054246
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
config: xtensa-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=xtensa

All warnings (new ones prefixed by >>):

drivers/bluetooth/hci_ldisc.c: In function 'hci_uart_init':
>> drivers/bluetooth/hci_ldisc.c:772:30: warning: assignment from incompatible pointer type
hci_uart_ldisc.compat_ioctl = hci_uart_tty_ioctl;
^

vim +772 drivers/bluetooth/hci_ldisc.c

756 {
757 static struct tty_ldisc_ops hci_uart_ldisc;
758 int err;
759
760 BT_INFO("HCI UART driver ver %s", VERSION);
761
762 /* Register the tty discipline */
763
764 memset(&hci_uart_ldisc, 0, sizeof(hci_uart_ldisc));
765 hci_uart_ldisc.magic = TTY_LDISC_MAGIC;
766 hci_uart_ldisc.name = "n_hci";
767 hci_uart_ldisc.open = hci_uart_tty_open;
768 hci_uart_ldisc.close = hci_uart_tty_close;
769 hci_uart_ldisc.read = hci_uart_tty_read;
770 hci_uart_ldisc.write = hci_uart_tty_write;
771 hci_uart_ldisc.ioctl = hci_uart_tty_ioctl;
> 772 hci_uart_ldisc.compat_ioctl = hci_uart_tty_ioctl;
773 hci_uart_ldisc.poll = hci_uart_tty_poll;
774 hci_uart_ldisc.receive_buf = hci_uart_tty_receive;
775 hci_uart_ldisc.write_wakeup = hci_uart_tty_wakeup;
776 hci_uart_ldisc.owner = THIS_MODULE;
777
778 err = tty_register_ldisc(N_HCI, &hci_uart_ldisc);
779 if (err) {
780 BT_ERR("HCI line discipline registration failed. (%d)", err);

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation


Attachments:
(No filename) (2.21 kB)
.config.gz (42.44 kB)
Download all attachments