From 36dce39c7d68b8f6c3bf225c4b4145d785174911 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 13 Oct 2014 04:22:43 +0200 Subject: [PATCH] 3.16-stable patches added patches: driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.patch serial-8250-add-quark-x1000-to-8250_pci.c.patch --- ...node-struct-from-unregister_one_node.patch | 59 +++++++++++++ ...l-8250-add-quark-x1000-to-8250_pci.c.patch | 85 +++++++++++++++++++ queue-3.16/series | 2 + 3 files changed, 146 insertions(+) create mode 100644 queue-3.16/driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.patch create mode 100644 queue-3.16/serial-8250-add-quark-x1000-to-8250_pci.c.patch diff --git a/queue-3.16/driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.patch b/queue-3.16/driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.patch new file mode 100644 index 00000000000..325ade2ee50 --- /dev/null +++ b/queue-3.16/driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.patch @@ -0,0 +1,59 @@ +From 33ead538f642a33b1d658782a5d14a40b5014d1f Mon Sep 17 00:00:00 2001 +From: Yasuaki Ishimatsu +Date: Fri, 3 Oct 2014 19:06:03 +0900 +Subject: driver/base/node: remove unnecessary kfree of node struct from unregister_one_node + +From: Yasuaki Ishimatsu + +commit 33ead538f642a33b1d658782a5d14a40b5014d1f upstream. + +Commit 92d585ef067d ("numa: fix NULL pointer access and memory +leak in unregister_one_node()") added kfree() of node struct in +unregister_one_node(). But node struct is freed by node_device_release() +which is called in unregister_node(). So by adding the kfree(), +node struct is freed two times. + +While hot removing memory, the commit leads the following BUG_ON(): + + kernel BUG at mm/slub.c:3346! + invalid opcode: 0000 [#1] SMP + [...] + Call Trace: + [...] unregister_one_node + [...] try_offline_node + [...] remove_memory + [...] acpi_memory_device_remove + [...] acpi_bus_trim + [...] acpi_bus_trim + [...] acpi_device_hotplug + [...] acpi_hotplug_work_fn + [...] process_one_work + [...] worker_thread + [...] ? rescuer_thread + [...] kthread + [...] ? kthread_create_on_node + [...] ret_from_fork + [...] ? kthread_create_on_node + +This patch removes unnecessary kfree() from unregister_one_node(). + +Signed-off-by: Yasuaki Ishimatsu +Cc: Xishi Qiu +Fixes: 92d585ef067d "numa: fix NULL pointer access and memory leak in unregister_one_node()" +Signed-off-by: Andrew Morton +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/base/node.c | 1 - + 1 file changed, 1 deletion(-) + +--- a/drivers/base/node.c ++++ b/drivers/base/node.c +@@ -603,7 +603,6 @@ void unregister_one_node(int nid) + return; + + unregister_node(node_devices[nid]); +- kfree(node_devices[nid]); + node_devices[nid] = NULL; + } + diff --git a/queue-3.16/serial-8250-add-quark-x1000-to-8250_pci.c.patch b/queue-3.16/serial-8250-add-quark-x1000-to-8250_pci.c.patch new file mode 100644 index 00000000000..26c87ab46ef --- /dev/null +++ b/queue-3.16/serial-8250-add-quark-x1000-to-8250_pci.c.patch @@ -0,0 +1,85 @@ +From 1ede7dcca3c4fa15a518ab0473126f9c3e621e4c Mon Sep 17 00:00:00 2001 +From: Bryan O'Donoghue +Date: Tue, 23 Sep 2014 01:21:11 +0100 +Subject: serial: 8250: Add Quark X1000 to 8250_pci.c + +From: Bryan O'Donoghue + +commit 1ede7dcca3c4fa15a518ab0473126f9c3e621e4c upstream. + +Quark X1000 contains two designware derived 8250 serial ports. +Each port has a unique PCI configuration space consisting of +BAR0:UART BAR1:DMA respectively. + +Unlike the standard 8250 the register width is 32 bits for RHR,IER etc +The Quark UART has a fundamental clock @ 44.2368 MHz allowing for a +bitrate of up to about 2.76 megabits per second. + +This patch enables standard 8250 mode + +Signed-off-by: Bryan O'Donoghue +Reviewed-by: Heikki Krogerus +Signed-off-by: Greg Kroah-Hartman + +--- + drivers/tty/serial/8250/8250_pci.c | 21 +++++++++++++++++++++ + 1 file changed, 21 insertions(+) + +--- a/drivers/tty/serial/8250/8250_pci.c ++++ b/drivers/tty/serial/8250/8250_pci.c +@@ -1790,6 +1790,7 @@ pci_wch_ch353_setup(struct serial_privat + #define PCI_DEVICE_ID_COMMTECH_4222PCIE 0x0022 + #define PCI_DEVICE_ID_BROADCOM_TRUMANAGE 0x160a + #define PCI_DEVICE_ID_AMCC_ADDIDATA_APCI7800 0x818e ++#define PCI_DEVICE_ID_INTEL_QRK_UART 0x0936 + + #define PCI_VENDOR_ID_SUNIX 0x1fd4 + #define PCI_DEVICE_ID_SUNIX_1999 0x1999 +@@ -1900,6 +1901,13 @@ static struct pci_serial_quirk pci_seria + .subdevice = PCI_ANY_ID, + .setup = byt_serial_setup, + }, ++ { ++ .vendor = PCI_VENDOR_ID_INTEL, ++ .device = PCI_DEVICE_ID_INTEL_QRK_UART, ++ .subvendor = PCI_ANY_ID, ++ .subdevice = PCI_ANY_ID, ++ .setup = pci_default_setup, ++ }, + /* + * ITE + */ +@@ -2742,6 +2750,7 @@ enum pci_board_num_t { + pbn_ADDIDATA_PCIe_8_3906250, + pbn_ce4100_1_115200, + pbn_byt, ++ pbn_qrk, + pbn_omegapci, + pbn_NETMOS9900_2s_115200, + pbn_brcm_trumanage, +@@ -3492,6 +3501,12 @@ static struct pciserial_board pci_boards + .uart_offset = 0x80, + .reg_shift = 2, + }, ++ [pbn_qrk] = { ++ .flags = FL_BASE0, ++ .num_ports = 1, ++ .base_baud = 2764800, ++ .reg_shift = 2, ++ }, + [pbn_omegapci] = { + .flags = FL_BASE0, + .num_ports = 8, +@@ -5194,6 +5209,12 @@ static struct pci_device_id serial_pci_t + pbn_byt }, + + /* ++ * Intel Quark x1000 ++ */ ++ { PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_QRK_UART, ++ PCI_ANY_ID, PCI_ANY_ID, 0, 0, ++ pbn_qrk }, ++ /* + * Cronyx Omega PCI + */ + { PCI_VENDOR_ID_PLX, PCI_DEVICE_ID_PLX_CRONYX_OMEGA, diff --git a/queue-3.16/series b/queue-3.16/series index 14ad99e9f9b..aa885419a8f 100644 --- a/queue-3.16/series +++ b/queue-3.16/series @@ -51,3 +51,5 @@ usb-serial-cp210x-added-ketra-n1-wireless-interface-support.patch usb-cp210x-add-support-for-seluxit-usb-dongle.patch usb-musb-dsps-kill-otg-timer-on-suspend.patch crypto-caam-fix-addressing-of-struct-member.patch +driver-base-node-remove-unnecessary-kfree-of-node-struct-from-unregister_one_node.patch +serial-8250-add-quark-x1000-to-8250_pci.c.patch -- 2.47.3