aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-04-16serial_core: Fix pm imbalance on unbindGeert Uytterhoeven1-0/+2
When a serial port is closed, uart_close() takes care of shutting down the hardware, and powering it down. When a serial port is unbound while in use, uart_close() bypasses all of this, as this is supposed to be done through uart_hangup() (invoked via tty_vhangup() in uart_remove_one_port()). However, uart_hangup() does not set the hardware's power state, leaving it powered up. This may also lead to unbounded nesting counts in clock and power management, depending on their internal implementation. Make sure to power down the port in uart_hangup(), except when the port is used as a serial console. For serial consoles, this operation must be postponed until after the port becomes completely unused. This case is not fixed yet, as it depends on a (future) fix for the tty->count vs. port->count imbalance on failed uart_open(). After this, the module clock used by the sh-sci driver is disabled on unbind while the serial port is in use. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16serial: pl011: change Rx burst size to half of trigger levelGuennadi Liakhovetski1-1/+1
The amba-pl011.c driver sets DMA burst size equal to FIFO trigger level. If now exactly DMA burst size bytes are received, the DMAC will retrieve them all and no Rx timeout interrupt will be generated. To fix that set the burst size to half the FIFO trigger level. Signed-off-by: Guennadi Liakhovetski <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16serial: timberdale: Depend on X86_32Jean Delvare1-0/+1
As far as I know the Timberdale chip was only used as a companion for Intel Atom E600 series processors. As such, its drivers are only useful on X86_32. Signed-off-by: Jean Delvare <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16serial: st-asc: Fix SysRq char handlingDaniel Thompson1-2/+2
This driver, like several others, uses the upper bits of the character to track both real and dummy state. Unfortunately it neglects to mask these bits properly when passing the character data around. This means neither break detection nor sysrq character handling work correctly. This patch adds the requires masking and has been tested to confirm that it correctly handles magic sysrq sequences on ST's B2020 board. Signed-off-by: Daniel Thompson <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16Revert "serial: clps711x: Give a chance to perform useful tasks during wait ↵Alexander Shiyan1-14/+6
loop" This reverts commit 63e3ad3252695a2b8c01b6f6c225e4537af08b85, since this not works as expected and produce runtime error: BUG: sleeping function called from invalid context at drivers/tty/serial/clps711x.c:379 in_atomic(): 0, irqs_disabled(): 128, pid: 287, name: mount Signed-off-by: Alexander Shiyan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16serial_core: Fix conditional start_tx on ring buffer not emptySeth Bollinger1-2/+1
If the serial_core ring buffer empties just as the tty layer receives an XOFF, then start_tx will never be called when the tty layer receives an XON as the serial_core ring buffer is empty. This will possibly leave a few bytes trapped in the fifo for drivers that disable the transmitter when flow controlled. Signed-off-by: Seth Bollinger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16serial: efm32: use $vendor,$device scheme for compatible stringUwe Kleine-König2-2/+5
Wolfram Sang pointed out that "efm32,$device" is non-standard. So use the common scheme and prefix device with "efm32-". The old compatible string is left in place until arch/arm/boot/dts/efm32* is fixed. Reported-by: Wolfram Sang <[email protected]> Signed-off-by: Uwe Kleine-König <[email protected]> Acked-by: Wolfram Sang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16serial: omap: free the wakeup settings in removeSanjay Singh Rawat1-0/+1
Signed-off-by: Sanjay Singh Rawat <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16Drivers: hv: vmbus: Negotiate version 3.0 when running on ws2012r2 hostsK. Y. Srinivasan2-2/+7
Only ws2012r2 hosts support the ability to reconnect to the host on VMBUS. This functionality is needed by kexec in Linux. To use this functionality we need to negotiate version 3.0 of the VMBUS protocol. Signed-off-by: K. Y. Srinivasan <[email protected]> Cc: <[email protected]> [3.9+] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16Documentation: Update stable address in Chinese and Japanese translationsGeert Uytterhoeven4-6/+6
The English and Korean translations were updated, the Chinese and Japanese weren't. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16topology: Fix compilation warning when not in SMPVincent Stehlé1-2/+1
The topology_##name() macro does not use its argument when CONFIG_SMP is not set, as it ultimately calls the cpu_data() macro. So we avoid maintaining a possibly unused `cpu' variable, to avoid the following compilation warning: drivers/base/topology.c: In function ‘show_physical_package_id’: drivers/base/topology.c:103:118: warning: unused variable ‘cpu’ [-Wunused-variable] define_id_show_func(physical_package_id); drivers/base/topology.c: In function ‘show_core_id’: drivers/base/topology.c:106:106: warning: unused variable ‘cpu’ [-Wunused-variable] define_id_show_func(core_id); This can be seen with e.g. x86 defconfig and CONFIG_SMP not set. Signed-off-by: Vincent Stehlé <[email protected]> Cc: Greg Kroah-Hartman <[email protected]> Cc: <[email protected]> # 3.10.x Cc: <[email protected]> # 3.13.x Cc: <[email protected]> # 3.14.x Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16Chinese: add translation of io_ordering.txtLin Yongting1-0/+67
This is a Chinese translated version of Documentation/io_ordering.txt Signed-off-by: Lin Yongting <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16stable_kernel_rules: spelling/word usageBrian Norris1-1/+1
"than" should be "then" Signed-off-by: Brian Norris <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16Tools: hv: Handle the case when the target file exists correctlyK. Y. Srinivasan2-1/+4
Return the appropriate error code and handle the case when the target file exists correctly. This fixes a bug. Signed-off-by: K. Y. Srinivasan <[email protected]> Cc: <[email protected]> [3.14] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16vme_tsi148: Utilize to_pci_dev() macroAaron Sierra1-8/+6
Save some characters by using to_pci_dev() instead of container_of(). Signed-off-by: Aaron Sierra <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16vme_tsi148: Fix PCI address mapping assumptionJoe Schultz1-1/+7
Previously, tsi148_master_set() assumed the address contained in its PCI bus resource represented the actual PCI bus address. This is a fine assumption on some platforms. However, on platforms that don't use a 1:1 (CPU:PCI) mapping this results in the tsi148 driver configuring an invalid master window translation. This patch updates the vme_tsi148 driver to first convert the address contained in the PCI bus resource into a PCI bus address before using it. [asierra: account for pcibios_resource_to_bus() prototype change] Signed-off-by: Joe Schultz <[email protected]> Signed-off-by: Aaron Sierra <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16vme_tsi148: Fix typo in tsi148_slave_get()Joe Schultz1-1/+1
This patch corrects a typo where "vme_base" was used instead of "*vme_base". The typo resulted in an incorrect value being returned to userspace (via vme_user). It also removes the following compile warning on some platforms: warning: cast from pointer to integer of different size [asierra: commit title/log rewording] Signed-off-by: Joe Schultz <[email protected]> Signed-off-by: Aaron Sierra <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16w1: avoid recursive device_addDavid Fries1-26/+6
__w1_attach_slave_device calls device_add which calls w1_bus_notify which calls the w1_bq27000 slave driver, which calls platform_device_add and device_add and deadlocks on getting &(&priv->bus_notifier)->rwsem as it is still held in the previous device_add. This avoids the problem by processing the family add/remove outside of the slave device_add call. Commit 47eba33a0997fc7362a introduced this deadlock and added a KOBJ_ADD, as the add was already reported in device_register two add events were being sent. This change suppresses the device_register add so that any slave device sysfs entries are setup before the add goes out. Belisko Marek reported this change fixed the deadlock he was seeing on ARM device tree, while testing on my x86-64 system never saw the deadlock. Reported-by: Belisko Marek <[email protected]> Signed-off-by: David Fries <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16w1: fix netlink refcnt leak on error pathDavid Fries1-18/+26
If the message type is W1_MASTER_CMD or W1_SLAVE_CMD, then a reference is taken when searching for the slave or master device. If there isn't any following data m->len (mlen is a copy) is 0 and packing up the message for later execution is skipped leaving nothing to decrement the reference counts. Way back when, m->len was checked before the search that increments the reference count, but W1_LIST_MASTERS has no additional data, the check was moved in 9be62e0b2fadaf5ff causing this bug. This change reorders to put the check before the reference count is incremented avoiding the problem. Signed-off-by: David Fries <[email protected]> Acked-by: Evgeniy Polyakov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16uas: fix deadlocky memory allocationsOliver Neukum1-2/+2
There are also two allocations with GFP_KERNEL in the pre-/post_reset code paths. That is no good because that is a part of the SCSI error handler. Signed-off-by: Oliver Neukum <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16uas: fix error handling during scsi_scan()Oliver Neukum1-1/+2
intfdata is set only after scsi_scan(). uas_pre_reset() however needs intfdata to be valid and will follow the NULL pointer killing khubd. intfdata must be preemptively set before the host is registered and undone in the error case. Signed-off-by: Oliver Neukum <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16uas: fix GFP_NOIO under spinlockOliver Neukum1-3/+3
Quote Dan: The patch e36e64930cff: "uas: Use GFP_NOIO rather then GFP_ATOMIC where possible" from Nov 7, 2013, leads to the following static checker warning: drivers/usb/storage/uas.c:806 uas_eh_task_mgmt() error: scheduling with locks held: 'spin_lock:lock' Some other allocations under spinlock are not caught. The fix essentially reverts e36e64930cffd94e1c37fdb82f35989384aa946b Signed-off-by: Oliver Neukum <[email protected]> Reported-by: Dan Carpenter <[email protected]> Reviewed-by: Hans de Goede <[email protected]> Acked-by: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16uwb: adds missing error handlingDaeseok Youn1-1/+4
There is checking NULL before dereferncing but it need to add "return". Signed-off-by: Daeseok Youn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: cdc-acm: Remove Motorola/Telit H24 serial interfaces from ACM driverMichael Ulbricht1-7/+21
By specifying NO_UNION_NORMAL the ACM driver does only use the first two USB interfaces (modem data & control). The AT Port, Diagnostic and NMEA interfaces are left to the USB serial driver. Signed-off-by: Michael Ulbricht <[email protected]> Signed-off-by: Alexander Stein <[email protected]> Signed-off-by: Oliver Neukum <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: ohci-jz4740: FEAT_POWER is a port feature, not a hub featureLaurent Pinchart1-2/+2
Power control of hub ports target the CLEAR_FEATURE and SET_FEATURE requests to ports, not to the hub. Fix the hub control function to detect the request correctly. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Lars-Peter Clausen <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: ohci-jz4740: Fix uninitialized variable warningLaurent Pinchart1-1/+1
The ret variable is not initialized in all code paths of the ohci_jz4740_hub_control function. Fix it. Signed-off-by: Laurent Pinchart <[email protected]> Acked-by: Lars-Peter Clausen <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: EHCI: tegra: set txfill_tuningStephen Warren1-0/+23
To avoid memory fetch underflows with larger USB transfers, Tegra SoCs need txfill_tuning's txfifothresh register field set to a non-default value. Add a custom reset override in order to set this up. These values are recommended practice for all Tegra chips. However, I've only noticed practical problems when not setting them this way on systems using Tegra124. Hence, CC: stable only for recent kernels which actually support Tegra124. Cc: <[email protected]> # 3.14+ Signed-off-by: Stephen Warren <[email protected]> Acked-by: Alan Stern <[email protected]> Tested-by: Alexandre Courbot <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16usb: ehci-platform: Return immediately from suspend if ehci_suspend failsVivek Gautam1-0/+2
Patch 'b8efdaf USB: EHCI: add check for wakeup/suspend race' adds a check for possible race between suspend and wakeup interrupt, and thereby it returns -EBUSY as error code if there's a wakeup interrupt. So the platform host controller should not proceed further with its suspend callback, rather should return immediately to avoid powering down the essential things, like phy. Signed-off-by: Vivek Gautam <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: Hauke Mehrtens <[email protected]> Cc: Hans de Goede <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16usb: ehci-exynos: Return immediately from suspend if ehci_suspend failsVivek Gautam1-0/+2
Patch 'b8efdaf USB: EHCI: add check for wakeup/suspend race' adds a check for possible race between suspend and wakeup interrupt, and thereby it returns -EBUSY as error code if there's a wakeup interrupt. So the platform host controller should not proceed further with its suspend callback, rather should return immediately to avoid powering down the essential things, like phy. Signed-off-by: Vivek Gautam <[email protected]> Acked-by: Jingoo Han <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: fix crash during hotplug of PCI USB controller cardAlan Stern1-1/+1
The code in hcd-pci.c that matches up EHCI controllers with their companion UHCI or OHCI controllers assumes that the private drvdata fields don't get set too early. However, it turns out that this field gets set by usb_create_hcd(), before hcd-pci expects it, and this can result in a crash when two controllers are probed in parallel (as can happen when a new controller card is hotplugged). The companions_rwsem lock was supposed to prevent this sort of thing, but usb_create_hcd() is called outside the scope of the rwsem. A simple solution is to check that the root-hub pointer has been initialized as well as the drvdata field. This doesn't happen until usb_add_hcd() is called; that call and the check are both protected by the rwsem. This patch should be applied to stable kernels from 3.10 onward. Signed-off-by: Alan Stern <[email protected]> Reported-by: Stefani Seibold <[email protected]> Tested-by: Stefani Seibold <[email protected]> CC: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: cdc-acm: fix double usb_autopm_put_interface() in acm_port_activate()Alexey Khoroshilov1-2/+4
If acm_submit_read_urbs() fails in acm_port_activate(), error handling code calls usb_autopm_put_interface() while it is already called before acm_submit_read_urbs(). The patch reorganizes error handling code to avoid double decrement of USB interface's PM-usage counter. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <[email protected]> Acked-by: Oliver Neukum <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16usb: usb-common: fix typo for usb_state_stringPeter Chen1-1/+1
%s/addresssed/addressed Signed-off-by: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: usb_wwan: fix handling of missing bulk endpointsJohan Hovold1-6/+3
Fix regression introduced by commit 8e493ca1767d ("USB: usb_wwan: fix bulk-urb allocation") by making sure to require both bulk-in and out endpoints during port probe. The original option driver (which usb_wwan is based on) was written under the assumption that either endpoint could be missing, but evidently this cannot have been tested properly. Specifically, it would handle opening a device without bulk-in (but would blow up during resume which was implemented later), but not a missing bulk-out in write() (although it is handled in some places such as write_room()). Fortunately (?), the driver also got the test for missing endpoints wrong so the urbs were in fact always allocated, although they would be initialised using the wrong endpoint address (0) and any submission of such an urb would fail. The commit mentioned above fixed the test for missing endpoints but thereby exposed the other bugs which would now generate null-pointer exceptions rather than failed urb submissions. The regression was introduced in v3.7, but the offending commit was also marked for stable. Reported-by: Rafał Miłecki <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Tested-by: Rafał Miłecki <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: pl2303: add ids for Hewlett-Packard HP POS pole displaysAaron Sanders2-1/+7
Add device ids to pl2303 for the Hewlett-Packard HP POS pole displays: LD960: 03f0:0B39 LCM220: 03f0:3139 LCM960: 03f0:3239 [ Johan: fix indentation and sort PIDs numerically ] Signed-off-by: Aaron Sanders <[email protected]> Cc: [email protected] Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: cp210x: Add 8281 (Nanotec Plug & Drive)Tristan Bruns1-0/+1
Signed-off-by: Tristan Bruns <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16usb: option driver, add support for Telit UE910v2Daniele Palmas1-0/+2
option driver, added VID/PID for Telit UE910v2 modem Signed-off-by: Daniele Palmas <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16Revert "USB: serial: add usbid for dell wwan card to sierra.c"Johan Hovold1-1/+0
This reverts commit 1ebca9dad5abe8b2ed4dbd186cd657fb47c1f321. This device was erroneously added to the sierra driver even though it's not a Sierra device and was already handled by the option driver. Cc: Richard Farina <[email protected]> Cc: [email protected] Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16USB: serial: ftdi_sio: add id for Brainboxes serial cardsMichele Baldessari2-0/+70
Custom VID/PIDs for Brainboxes cards as reported in https://bugzilla.redhat.com/show_bug.cgi?id=1071914 Signed-off-by: Michele Baldessari <[email protected]> Cc: stable <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16staging: r8188eu: Fix case where ethtype was never obtained and always be ↵Larry Finger1-9/+6
checked against 0 Zero-initializing ether_type masked that the ether type would never be obtained for 8021x packets and the comparison against eapol_type would always fail. Reported-by: Jes Sorensen <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16staging: r8712u: Fix case where ethtype was never obtained and always be ↵Larry Finger1-7/+6
checked against 0 Zero-initializing ether_type masked that the ether type would never be obtained for 8021x packets and the comparison against eapol_type would always fail. Reported-by: Jes Sorensen <[email protected]> Signed-off-by: Larry Finger <[email protected]> Cc: Stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16misc: Grammar s/addition/additional/Geert Uytterhoeven1-2/+2
Signed-off-by: Geert Uytterhoeven <[email protected]> Cc: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16drivers: mcb: fix memory leak in chameleon_parse_cells() error pathChristoph Jaeger1-0/+1
chameleon_parse_cells() bails out if chameleon descriptor type is invalid but does not free the storage 'header' points to. Signed-off-by: Christoph Jaeger <[email protected]> Signed-off-by: Johannes Thumshirn <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16seccomp: fix memory leak on filter attachKees Cook1-0/+2
This sets the correct error code when final filter memory is unavailable, and frees the raw filter no matter what. unreferenced object 0xffff8800d6ea4000 (size 512): comm "sshd", pid 278, jiffies 4294898315 (age 46.653s) hex dump (first 32 bytes): 21 00 00 00 04 00 00 00 15 00 01 00 3e 00 00 c0 !...........>... 06 00 00 00 00 00 00 00 21 00 00 00 00 00 00 00 ........!....... backtrace: [<ffffffff8151414e>] kmemleak_alloc+0x4e/0xb0 [<ffffffff811a3a40>] __kmalloc+0x280/0x320 [<ffffffff8110842e>] prctl_set_seccomp+0x11e/0x3b0 [<ffffffff8107bb6b>] SyS_prctl+0x3bb/0x4a0 [<ffffffff8152ef2d>] system_call_fastpath+0x1a/0x1f [<ffffffffffffffff>] 0xffffffffffffffff Reported-by: Masami Ichikawa <[email protected]> Signed-off-by: Kees Cook <[email protected]> Tested-by: Masami Ichikawa <[email protected]> Acked-by: Daniel Borkmann <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-04-16mei: ignore client writing state during cb completionAlexander Usyskin2-4/+2
Ignore client writing state during cb completion to fix a memory leak. When moving cbs to the completion list we should not look at writing_state as this state can be already overwritten by next write, the fact that a cb is on the write waiting list means that it was already written to the HW and we can safely complete it. Same pays for wait in poll handler, we do not have to check the state wake is done after completion list processing. Cc: [email protected] Signed-off-by: Alexander Usyskin <[email protected]> Signed-off-by: Tomas Winkler <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16mei: me: do not load the driver if the FW doesn't support MEI interfaceTomas Winkler2-7/+28
NM and SPS FW types that may run on ME device on server platforms do not have valid MEI/HECI interface and driver should not be bound to it as this might lead to system hung. In practice not all BIOSes effectively hide such devices from the OS and in some cases it is not possible. We determine FW type by examining Host FW status registers in order to unbind the driver. In this patch we are adding check for ME on Cougar Point, Lynx Point Devices Cc: stable <[email protected]> # 3.10+ Signed-off-by: Tomas Winkler <[email protected]> Tested-by: Nikola Ciprich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-04-16isdn: icn: buffer overflow in icn_command()Dan Carpenter1-6/+5
This buffer over was detected using static analysis: drivers/isdn/icn/icn.c:1325 icn_command() error: format string overflow. buf_size: 60 length: 98 The calculation for the length of the string is off because it assumes that the dial[] buffer holds a 50 character string, but actually it is at most 31 characters and NUL. I have removed the dial[] buffer because it isn't needed. The maximum length of the string is actually 79 characters and a NUL. I have made the cbuf[] array large enough to hold it and changed the sprintf() to an snprintf() as a further safety enhancement. Signed-off-by: Dan Carpenter <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-04-16ip6_tunnel: use the right netns in ioctl handlerNicolas Dichtel1-4/+4
Because the netdevice may be in another netns than the i/o netns, we should use the i/o netns instead of dev_net(dev). Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-04-16sit: use the right netns in ioctl handlerNicolas Dichtel1-13/+4
Because the netdevice may be in another netns than the i/o netns, we should use the i/o netns instead of dev_net(dev). Note that netdev_priv(dev) cannot bu NULL, hence we can remove these useless checks. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-04-16ip_tunnel: use the right netns in ioctl handlerNicolas Dichtel1-8/+7
Because the netdevice may be in another netns than the i/o netns, we should use the i/o netns instead of dev_net(dev). The variable 'tunnel' was used only to get 'itn', hence to simplify code I remove it and use 't' instead. Signed-off-by: Nicolas Dichtel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
2014-04-16net: use SYSCALL_DEFINEx for sys_recvJan Glauber1-2/+2
Make sys_recv a first class citizen by using the SYSCALL_DEFINEx macro. Besides being cleaner this will also generate meta data for the system call so tracing tools like ftrace or LTTng can resolve this system call. Signed-off-by: Jan Glauber <[email protected]> Signed-off-by: David S. Miller <[email protected]>