Linux 3.10.89
Greg KH
maintainerI'm announcing the release of the 3.10.89 kernel.
All users of the 3.10 kernel series must upgrade.
The updated 3.10.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.10.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 - arch/x86/crypto/ghash-clmulni-intel_glue.c | 1 arch/xtensa/Makefile | 4 +- arch/xtensa/boot/Makefile | 2 - arch/xtensa/include/asm/traps.h | 29 ++++++++++++++------- arch/xtensa/kernel/entry.S | 7 ++--- drivers/auxdisplay/ks0108.c | 1 drivers/base/devres.c | 4 +- drivers/base/platform.c | 8 +---- drivers/clk/versatile/clk-sp810.c | 4 +- drivers/gpu/drm/radeon/radeon_connectors.c | 5 +++ drivers/hid/usbhid/hid-core.c | 2 - drivers/iio/gyro/Kconfig | 3 +- drivers/iio/imu/adis16480.c | 39 ++++++++++++++++++++++++----- drivers/of/address.c | 6 ++-- drivers/pci/quirks.c | 9 ++++-- drivers/tty/serial/8250/8250_pnp.c | 5 +++ drivers/usb/dwc3/ep0.c | 12 +++++++- drivers/usb/host/ehci-sysfs.c | 8 ++--- drivers/usb/serial/ftdi_sio.c | 4 ++ drivers/usb/serial/ftdi_sio_ids.h | 8 +++++ drivers/usb/serial/symbolserial.c | 6 ++-- fs/hpfs/namei.c | 25 +++++++++++++++++- include/linux/iio/iio.h | 17 ++++++++++++ 24 files changed, 160 insertions(+), 51 deletions(-)
Andrey Ryabinin (1):
crypto: ghash-clmulni: specify context size for ghash async algorithm
Bjorn Helgaas (1):
PCI: Fix TI816X class code quirk
Dan Carpenter (1):
clk: versatile: off by one in clk_sp810_timerclken_of_get()
David Daney (1):
of/address: Don't loop forever in of_find_matching_node_by_address().
Don Zickus (1):
HID: usbhid: Fix the check for HID_RESET_PENDING in hid_io_error
Grant Likely (1):
drivercore: Fix unregistration path of platform devices
Greg Kroah-Hartman (1):
Linux 3.10.89
Kishon Vijay Abraham I (1):
usb: dwc3: ep0: Fix mem corruption on OUT transfers of more than 512 bytes
Lars-Peter Clausen (2):
iio: Add inverse unit conversion macros
iio: adis16480: Fix scale factors
Maciej S. Szmigiero (1):
serial: 8250: don't bind to SMSC IrCC IR port
Markus Pargmann (1):
iio: bmg160: IIO_BUFFER and IIO_TRIGGERED_BUFFER are required
Masahiro Yamada (1):
devres: fix devres_get()
Matthijs Kooijman (1):
USB: ftdi_sio: Added custom PID for CustomWare products
Max Filippov (3):
xtensa: fix threadptr reload on return to userspace
xtensa: fix kernel register spilling
xtensa: don't use echo -e needlessly
Mikulas Patocka (1):
hpfs: update ctime and mtime on directory modification
Peter Chen (1):
usb: host: ehci-sys: delete useless bus_to_hcd conversion
Philipp Hachtmann (1):
USB: symbolserial: Use usb_get_serial_port_data
Stephen Chandler Paul (1):
DRM - radeon: Don't link train DisplayPort on HPD until we get the dpcd
Sudip Mukherjee (1):
auxdisplay: ks0108: fix refcount
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 88 +SUBLEVEL = 89 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/x86/crypto/ghash-clmulni-intel_glue.c +1 -0
@@ -291,6 +291,7 @@ static struct ahash_alg ghash_async_alg = { .cra_name = "ghash", .cra_driver_name = "ghash-clmulni", .cra_priority = 400, + .cra_ctxsize = sizeof(struct ghash_async_ctx), .cra_flags = CRYPTO_ALG_TYPE_AHASH | CRYPTO_ALG_ASYNC, .cra_blocksize = GHASH_BLOCK_SIZE, .cra_type = &crypto_ahash_type,
arch/xtensa/Makefile +2 -2
@@ -55,10 +55,10 @@ ifneq ($(CONFIG_LD_NO_RELAX),) LDFLAGS := --no-relax endif -ifeq ($(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1) +ifeq ($(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#"),1) CHECKFLAGS += -D__XTENSA_EB__ endif -ifeq ($(shell echo -e __XTENSA_EL__ | $(CC) -E - | grep -v "\#"),1) +ifeq ($(shell echo __XTENSA_EL__ | $(CC) -E - | grep -v "\#"),1) CHECKFLAGS += -D__XTENSA_EL__ endif
arch/xtensa/boot/Makefile +1 -1
@@ -12,7 +12,7 @@ KBUILD_CFLAGS += -fno-builtin -Iarch/$(ARCH)/boot/include HOSTFLAGS += -Iarch/$(ARCH)/boot/include -BIG_ENDIAN := $(shell echo -e __XTENSA_EB__ | $(CC) -E - | grep -v "\#") +BIG_ENDIAN := $(shell echo __XTENSA_EB__ | $(CC) -E - | grep -v "\#") export ccflags-y export BIG_ENDIAN
arch/xtensa/include/asm/traps.h +19 -10
@@ -24,30 +24,39 @@ static inline void spill_registers(void) {#if XCHAL_NUM_AREGS >16 __asm__ __volatile__ ( -" call12 1f\n" + " call8 1f\n" " _j 2f\n" " retw\n" " .align 4\n" "1:\n" +#if XCHAL_NUM_AREGS ==32 +" _entry a1, 32\n" +" addi a8, a0, 3\n" +" _entry a1, 16\n" +" mov a12, a12\n" + " retw\n" +#else " _entry a1, 48\n" -" addi a12, a0, 3\n" -#if XCHAL_NUM_AREGS > 32 - " .rept (" __stringify(XCHAL_NUM_AREGS) " - 32) / 12\n" +" call12 1f\n" +" retw\n" +" .align 4\n" +"1:\n" + " .rept (" __stringify(XCHAL_NUM_AREGS) " - 16) / 12\n"" _entry a1, 48\n" " mov a12, a0\n" " .endr\n" -#endif - " _entry a1, 48\n" + " _entry a1, 16\n"#if XCHAL_NUM_AREGS %12 ==0 - " mov a8, a8\n" -#elif XCHAL_NUM_AREGS %12 ==4 " mov a12, a12\n" -#elif XCHAL_NUM_AREGS %12 ==8 +#elif XCHAL_NUM_AREGS %12 ==4 " mov a4, a4\n" +#elif XCHAL_NUM_AREGS %12 ==8 +" mov a8, a8\n" #endif " retw\n" +#endif "2:\n" - : : : "a12", "a13", "memory"); + : : : "a8", "a9", "memory");#else __asm__ __volatile__ ( " mov a12, a12\n"
arch/xtensa/kernel/entry.S +4 -3
@@ -549,12 +549,13 @@ user_exception_exit: * (if we have restored WSBITS-1 frames). */ +2: #if XCHAL_HAVE_THREADPTR l32i a3, a1, PT_THREADPTR wur a3, threadptr #endif -2: j common_exception_exit + j common_exception_exit /* This is the kernel exception exit. * We avoided to do a MOVSP when we entered the exception, but we
@@ -1933,7 +1934,7 @@ ENDPROC(system_call) mov a12, a0 .endr #endif - _entry a1, 48 + _entry a1, 16 #if XCHAL_NUM_AREGS % 12 == 0 mov a8, a8 #elif XCHAL_NUM_AREGS % 12 == 4
@@ -1957,7 +1958,7 @@ ENDPROC(system_call) ENTRY(_switch_to) - entry a1, 16 + entry a1, 48 mov a11, a3 # and 'next' (a3)
drivers/auxdisplay/ks0108.c +1 -0
@@ -139,6 +139,7 @@ static int __init ks0108_init(void) ks0108_pardevice =parport_register_device (ks0108_parport,KS0108_NAME ,NULL ,NULL ,NULL ,PARPORT_DEV_EXCL ,NULL ); +parport_put_port (ks0108_parport);if (ks0108_pardevice ==NULL ) { printk(KERN_ERR KS0108_NAME ": ERROR: " "parport didn't register new device\n");
drivers/base/devres.c +2 -2
@@ -296,10 +296,10 @@ void * devres_get(struct device *dev, void *new_res,if (!dr) {add_dr (dev, &new_dr->node); dr = new_dr; - new_dr =NULL ; + new_res =NULL ; }spin_unlock_irqrestore (&dev->devres_lock, flags); -devres_free (new_dr); +devres_free (new_res);return dr->data; }
drivers/base/platform.c +2 -6
@@ -347,9 +347,7 @@ int platform_device_add(struct platform_device *pdev)while (--i >=0 ) {struct resource *r = &pdev->resource[i]; -unsigned long type =resource_type (r); - -if (type ==IORESOURCE_MEM || type ==IORESOURCE_IO ) +if (r->parent)release_resource (r); }
@@ -380,9 +378,7 @@ void platform_device_del(struct platform_device *pdev)for (i =0 ; i < pdev->num_resources; i++) {struct resource *r = &pdev->resource[i]; -unsigned long type =resource_type (r); - -if (type ==IORESOURCE_MEM || type ==IORESOURCE_IO ) +if (r->parent)release_resource (r); } }
drivers/clk/versatile/clk-sp810.c +2 -2
@@ -128,8 +128,8 @@ struct clk *clk_sp810_timerclken_of_get(struct of_phandle_args *clkspec, {struct clk_sp810 *sp810 = data; -if (WARN_ON (clkspec->args_count !=1 || clkspec->args[0 ] > -ARRAY_SIZE (sp810->timerclken))) +if (WARN_ON (clkspec->args_count !=1 || + clkspec->args[0 ] >=ARRAY_SIZE (sp810->timerclken)))return NULL ;return sp810->timerclken[clkspec->args[0 ]].clk;
drivers/gpu/drm/radeon/radeon_connectors.c +5 -0
@@ -78,6 +78,11 @@ void radeon_connector_hotplug(struct drm_connector *connector)if (!radeon_hpd_sense (rdev, radeon_connector->hpd.hpd)) {drm_helper_connector_dpms (connector,DRM_MODE_DPMS_OFF ); }else if (radeon_dp_needs_link_train (radeon_connector)) { +/* Don't try to start link training before we +* have the dpcd */ +if (!radeon_dp_getdpcd (radeon_connector)) +return ; +/* set it to OFF so that drm_helper_connector_dpms() * won't return immediately since the current state * is ON at this point.
drivers/hid/usbhid/hid-core.c +1 -1
@@ -180,7 +180,7 @@ static void hid_io_error(struct hid_device *hid)if (time_after (jiffies, usbhid->stop_retry)) {/* Retries failed, so do a port reset unless we lack bandwidth*/ -if (test_bit (HID_NO_BANDWIDTH , &usbhid->iofl) +if (!test_bit (HID_NO_BANDWIDTH , &usbhid->iofl) && !test_and_set_bit (HID_RESET_PENDING , &usbhid->iofl)) {schedule_work (&usbhid->reset_work);
drivers/iio/gyro/Kconfig +2 -1
@@ -73,7 +73,8 @@ config IIO_ST_GYRO_SPI_3AXIS config ITG3200 tristate "InvenSense ITG3200 Digital 3-Axis Gyroscope I2C driver" depends on I2C - select IIO_TRIGGERED_BUFFER if IIO_BUFFER + select IIO_BUFFER + select IIO_TRIGGERED_BUFFER help Say yes here to add support for the InvenSense ITG3200 digital 3-axis gyroscope sensor.
drivers/iio/imu/adis16480.c +33 -6
@@ -110,6 +110,10 @@struct adis16480_chip_info {unsigned int num_channels;const struct iio_chan_spec *channels; +unsigned int gyro_max_val; +unsigned int gyro_max_scale; +unsigned int accel_max_val; +unsigned int accel_max_scale; };struct adis16480 {
@@ -533,19 +537,21 @@ static int adis16480_set_filter_freq(struct iio_dev *indio_dev,static int adis16480_read_raw (struct iio_dev *indio_dev,const struct iio_chan_spec *chan,int *val,int *val2,long info) { +struct adis16480 *st =iio_priv (indio_dev); +switch (info) {case IIO_CHAN_INFO_RAW :return adis_single_conversion (indio_dev, chan,0 , val);case IIO_CHAN_INFO_SCALE :switch (chan->type) {case IIO_ANGL_VEL : - *val =0 ; - *val2 =IIO_DEGREE_TO_RAD (20000 );/* 0.02 degree/sec */ -return IIO_VAL_INT_PLUS_MICRO ; + *val = st->chip_info->gyro_max_scale; + *val2 = st->chip_info->gyro_max_val; +return IIO_VAL_FRACTIONAL ;case IIO_ACCEL : - *val =0 ; - *val2 =IIO_G_TO_M_S_2 (800 );/* 0.8 mg */ -return IIO_VAL_INT_PLUS_MICRO ; + *val = st->chip_info->accel_max_scale; + *val2 = st->chip_info->accel_max_val; +return IIO_VAL_FRACTIONAL ;case IIO_MAGN : *val =0 ; *val2 =100 ;/* 0.0001 gauss */
@@ -702,18 +708,39 @@ static const struct adis16480_chip_info adis16480_chip_info[] = { [ADIS16375 ] = { .channels = adis16485_channels, .num_channels =ARRAY_SIZE (adis16485_channels), +/* +* storing the value in rad/degree and the scale in degree +* gives us the result in rad and better precession than +* storing the scale directly in rad. +*/ + .gyro_max_val =IIO_RAD_TO_DEGREE (22887 ), + .gyro_max_scale =300 , + .accel_max_val =IIO_M_S_2_TO_G (21973 ), + .accel_max_scale =18 , }, [ADIS16480 ] = { .channels = adis16480_channels, .num_channels =ARRAY_SIZE (adis16480_channels), + .gyro_max_val =IIO_RAD_TO_DEGREE (22500 ), + .gyro_max_scale =450 , + .accel_max_val =IIO_M_S_2_TO_G (12500 ), + .accel_max_scale =5 , }, [ADIS16485 ] = { .channels = adis16485_channels, .num_channels =ARRAY_SIZE (adis16485_channels), + .gyro_max_val =IIO_RAD_TO_DEGREE (22500 ), + .gyro_max_scale =450 , + .accel_max_val =IIO_M_S_2_TO_G (20000 ), + .accel_max_scale =5 , }, [ADIS16488 ] = { .channels = adis16480_channels, .num_channels =ARRAY_SIZE (adis16480_channels), + .gyro_max_val =IIO_RAD_TO_DEGREE (22500 ), + .gyro_max_scale =450 , + .accel_max_val =IIO_M_S_2_TO_G (22500 ), + .accel_max_scale =18 , }, };
drivers/of/address.c +3 -3
@@ -629,10 +629,10 @@ struct device_node *of_find_matching_node_by_address(struct device_node *from,struct resource res;while (dn) { -if (of_address_to_resource (dn,0 , &res)) -continue ; -if (res.start == base_address) +if (!of_address_to_resource (dn,0 , &res) && + res.start == base_address)return dn; + dn =of_find_matching_node (dn, matches); }
drivers/pci/quirks.c +6 -3
@@ -2796,12 +2796,15 @@ DECLARE_PCI_FIXUP_EARLY(PCI_VENDOR_ID_INTEL, 0x3c28, vtd_mask_spec_errors);static void fixup_ti816x_class (struct pci_dev *dev) { +u32 class = dev->class; +/* TI 816x devices do not have class code set when in PCIe boot mode */ -dev_info (&dev->dev,"Setting PCI class for 816x PCIe device\n" ); - dev->class =PCI_CLASS_MULTIMEDIA_VIDEO ; + dev->class =PCI_CLASS_MULTIMEDIA_VIDEO <<8 ; +dev_info (&dev->dev,"PCI class overridden (%#08x -> %#08x)\n" , + class, dev->class); }DECLARE_PCI_FIXUP_CLASS_EARLY (PCI_VENDOR_ID_TI ,0xb800 , -PCI_CLASS_NOT_DEFINED ,0 , fixup_ti816x_class); +PCI_CLASS_NOT_DEFINED ,0 , fixup_ti816x_class);/* Some PCIe devices do not work reliably with the claimed maximum * payload size supported.
drivers/tty/serial/8250/8250_pnp.c +5 -0
@@ -365,6 +365,11 @@ static const struct pnp_device_id pnp_dev_table[] = {/* Winbond CIR port, should not be probed. We should keep track of it to prevent the legacy serial driver from probing it */ { "WEC1022", CIR_PORT }, +/* +* SMSC IrCC SIR/FIR port, should not be probed by serial driver +* as well so its own driver can bind to it. +*/ + { "SMCF010", CIR_PORT }, { "", 0 } };
drivers/usb/dwc3/ep0.c +10 -2
@@ -804,6 +804,11 @@ static void dwc3_ep0_complete_data(struct dwc3 *dwc,unsigned maxp = ep0->endpoint.maxpacket; transfer_size += (maxp - (transfer_size % maxp)); + +/* Maximum of DWC3_EP0_BOUNCE_SIZE can only be received */ +if (transfer_size >DWC3_EP0_BOUNCE_SIZE ) + transfer_size =DWC3_EP0_BOUNCE_SIZE ; + transferred =min_t (u32, ur->length, transfer_size - length);memcpy (ur->buf, dwc->ep0_bounce, transferred);
@@ -916,11 +921,14 @@ static void __dwc3_ep0_do_control_data(struct dwc3 *dwc,return ; } -WARN_ON (req->request.length >DWC3_EP0_BOUNCE_SIZE ); - maxpacket = dep->endpoint.maxpacket; transfer_size =roundup (req->request.length, maxpacket); +if (transfer_size >DWC3_EP0_BOUNCE_SIZE ) { +dev_WARN (dwc->dev,"bounce buf can't handle req len\n" ); + transfer_size =DWC3_EP0_BOUNCE_SIZE ; + } + dwc->ep0_bounced = true;/*
drivers/usb/host/ehci-sysfs.c +4 -4
@@ -29,7 +29,7 @@ static ssize_t show_companion(struct device *dev,int count =PAGE_SIZE ;char *ptr = buf; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev)); nports =HCS_N_PORTS (ehci->hcs_params);for (index =0 ; index < nports; ++index) {
@@ -54,7 +54,7 @@ static ssize_t store_companion(struct device *dev,struct ehci_hcd *ehci;int portnum, new_owner; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev)); new_owner =PORT_OWNER ;/* Owned by companion */ if (sscanf (buf,"%d" , &portnum) !=1 )return -EINVAL ;
@@ -85,7 +85,7 @@ static ssize_t show_uframe_periodic_max(struct device *dev,struct ehci_hcd *ehci;int n; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev)); n =scnprintf (buf,PAGE_SIZE ,"%d\n" , ehci->uframe_periodic_max);return n; }
@@ -102,7 +102,7 @@ static ssize_t store_uframe_periodic_max(struct device *dev,unsigned long flags;ssize_t ret; - ehci =hcd_to_ehci (bus_to_hcd (dev_get_drvdata (dev))); + ehci =hcd_to_ehci (dev_get_drvdata (dev));if (kstrtouint (buf,0 , &uframe_periodic_max) <0 )return -EINVAL ;
drivers/usb/serial/ftdi_sio.c +4 -0
@@ -621,6 +621,10 @@ static struct usb_device_id id_table_combined [] = { { USB_DEVICE(FTDI_VID, FTDI_NT_ORIONLXM_PID), .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk }, { USB_DEVICE(FTDI_VID, FTDI_SYNAPSE_SS200_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX2WI_PID) }, + { USB_DEVICE(FTDI_VID, FTDI_CUSTOMWARE_MINIPLEX3_PID) },/* * ELV devices: */
drivers/usb/serial/ftdi_sio_ids.h +8 -0
@@ -568,6 +568,14 @@*/ #define FTDI_SYNAPSE_SS200_PID 0x9090/* SS200 - SNAP Stick 200 */ +/* +* CustomWare / ShipModul NMEA multiplexers product ids (FTDI_VID) +*/ +#define FTDI_CUSTOMWARE_MINIPLEX_PID 0xfd48/* MiniPlex first generation NMEA Multiplexer */ +#define FTDI_CUSTOMWARE_MINIPLEX2_PID 0xfd49/* MiniPlex-USB and MiniPlex-2 series */ +#define FTDI_CUSTOMWARE_MINIPLEX2WI_PID 0xfd4a/* MiniPlex-2Wi */ +#define FTDI_CUSTOMWARE_MINIPLEX3_PID 0xfd4b/* MiniPlex-3 series */ +/********************************/ /** third-party VID/PID combos **/
drivers/usb/serial/symbolserial.c +3 -3
@@ -97,7 +97,7 @@ exit:static int symbol_open (struct tty_struct *tty,struct usb_serial_port *port) { -struct symbol_private *priv =usb_get_serial_data (port->serial); +struct symbol_private *priv =usb_get_serial_port_data (port);unsigned long flags;int result =0 ;
@@ -123,7 +123,7 @@ static void symbol_close(struct usb_serial_port *port)static void symbol_throttle (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data; -struct symbol_private *priv =usb_get_serial_data (port->serial); +struct symbol_private *priv =usb_get_serial_port_data (port);spin_lock_irq (&priv->lock); priv->throttled = true;
@@ -133,7 +133,7 @@ static void symbol_throttle(struct tty_struct *tty)static void symbol_unthrottle (struct tty_struct *tty) {struct usb_serial_port *port = tty->driver_data; -struct symbol_private *priv =usb_get_serial_data (port->serial); +struct symbol_private *priv =usb_get_serial_port_data (port);int result;bool was_throttled;
fs/hpfs/namei.c +24 -1
@@ -8,6 +8,17 @@#include <linux/sched.h> #include "hpfs_fn.h" +static void hpfs_update_directory_times (struct inode *dir) +{ +time_t t =get_seconds (); +if (t == dir->i_mtime.tv_sec && + t == dir->i_ctime.tv_sec) +return ; + dir->i_mtime.tv_sec = dir->i_ctime.tv_sec = t; + dir->i_mtime.tv_nsec = dir->i_ctime.tv_nsec =0 ; +hpfs_write_inode_nolock (dir); +} +static int hpfs_mkdir (struct inode *dir,struct dentry *dentry,umode_t mode) {const unsigned char *name = dentry->d_name.name;
@@ -99,6 +110,7 @@ static int hpfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode) result->i_mode = mode |S_IFDIR ;hpfs_write_inode_nolock (result); } +hpfs_update_directory_times (dir);d_instantiate (dentry, result);hpfs_unlock (dir->i_sb);return 0 ;
@@ -187,6 +199,7 @@ static int hpfs_create(struct inode *dir, struct dentry *dentry, umode_t mode, b result->i_mode = mode |S_IFREG ;hpfs_write_inode_nolock (result); } +hpfs_update_directory_times (dir);d_instantiate (dentry, result);hpfs_unlock (dir->i_sb);return 0 ;
@@ -262,6 +275,7 @@ static int hpfs_mknod(struct inode *dir, struct dentry *dentry, umode_t mode, deinsert_inode_hash (result);hpfs_write_inode_nolock (result); +hpfs_update_directory_times (dir);d_instantiate (dentry, result);brelse (bh);hpfs_unlock (dir->i_sb);
@@ -340,6 +354,7 @@ static int hpfs_symlink(struct inode *dir, struct dentry *dentry, const char *syinsert_inode_hash (result);hpfs_write_inode_nolock (result); +hpfs_update_directory_times (dir);d_instantiate (dentry, result);hpfs_unlock (dir->i_sb);return 0 ;
@@ -423,6 +438,8 @@ again: out1:hpfs_brelse4 (&qbh); out: +if (!err) +hpfs_update_directory_times (dir);hpfs_unlock (dir->i_sb);return err; }
@@ -477,6 +494,8 @@ static int hpfs_rmdir(struct inode *dir, struct dentry *dentry) out1:hpfs_brelse4 (&qbh); out: +if (!err) +hpfs_update_directory_times (dir);hpfs_unlock (dir->i_sb);return err; }
@@ -595,7 +614,7 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry, goto end1; } - end: +end:hpfs_i (i)->i_parent_dir = new_dir->i_ino;if (S_ISDIR (i->i_mode)) {inc_nlink (new_dir);
@@ -610,6 +629,10 @@ static int hpfs_rename(struct inode *old_dir, struct dentry *old_dentry,brelse (bh); } end1: +if (!err) { +hpfs_update_directory_times (old_dir); +hpfs_update_directory_times (new_dir); + }hpfs_unlock (i->i_sb);return err; }
include/linux/iio/iio.h +17 -0
@@ -569,6 +569,15 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,#define IIO_DEGREE_TO_RAD (deg) (((deg) * 314159ULL + 9000000ULL) / 18000000ULL)/** +* IIO_RAD_TO_DEGREE() - Convert rad to degree +* @rad: A value in rad +* +* Returns the given value converted from rad to degree +*/ +#define IIO_RAD_TO_DEGREE (rad) \ + (((rad) * 18000000ULL + 314159ULL / 2) / 314159ULL) + +/** * IIO_G_TO_M_S_2() - Convert g to meter / second**2 * @g: A value in g *
@@ -576,4 +585,12 @@ int iio_str_to_fixpoint(const char *str, int fract_mult, int *integer,*/ #define IIO_G_TO_M_S_2 (g) ((g) * 980665ULL / 100000ULL) +/** +* IIO_M_S_2_TO_G() - Convert meter / second**2 to g +* @ms2: A value in meter / second**2 +* +* Returns the given value converted from meter / second**2 to g +*/ +#define IIO_M_S_2_TO_G (ms2) (((ms2) * 100000ULL + 980665ULL / 2) / 980665ULL) +#endif /* _INDUSTRIAL_IO_H_ */
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 10 -SUBLEVEL = 89 +SUBLEVEL = 90 EXTRAVERSION = NAME = TOSSUG Baby Fish
arch/arm64/Kconfig +4 -0
@@ -56,6 +56,10 @@ config NO_IOPORT config STACKTRACE_SUPPORT def_bool y +config ILLEGAL_POINTER_VALUE + hex + default 0xdead000000000000 + config LOCKDEP_SUPPORT def_bool y
arch/arm64/kernel/head.S +5 -0
@@ -184,6 +184,11 @@ ENTRY(el2_setup) msr hstr_el2, xzr // Disable CP15 traps to EL2 #endif + /* EL2 debug */ + mrs x0, pmcr_el0 // Disable debug access traps + ubfx x0, x0, #11, #5 // to EL2 and allow access to + msr mdcr_el2, x0 // all PMU counters from EL1 + /* Stage-2 translation */ msr vttbr_el2, xzr
arch/arm64/kernel/signal32.c +36 -11
79 lines not on this page · raw message
arch/parisc/kernel/irq.c +6 -2
@@ -524,8 +524,8 @@ void do_cpu_irq_mask(struct pt_regs *regs)struct pt_regs *old_regs;unsigned long eirr_val;int irq, cpu =smp_processor_id (); -#ifdef CONFIG_SMP struct irq_desc *desc; +#ifdef CONFIG_SMP cpumask_t dest;#endif
@@ -538,8 +538,12 @@ void do_cpu_irq_mask(struct pt_regs *regs) goto set_out; irq =eirr_to_irq (eirr_val); -#ifdef CONFIG_SMP +/* Filter out spurious interrupts, mostly from serial port at bootup */ desc =irq_to_desc (irq); +if (unlikely (!desc->action)) + goto set_out; + +#ifdef CONFIG_SMP cpumask_copy (&dest, desc->irq_data.affinity);if (irqd_is_per_cpu (&desc->irq_data) && !cpu_isset (smp_processor_id (), dest)) {
arch/powerpc/include/asm/pgtable-ppc64.h +13 -1
@@ -130,7 +130,19 @@#define pte_iterate_hashed_end () } while(0)#ifdef CONFIG_PPC_HAS_HASH_64K -#define pte_pagesize_index (mm, addr, pte) get_slice_psize(mm, addr) +/* +* We expect this to be called only for user addresses or kernel virtual +* addresses other than the linear mapping. +*/ +#define pte_pagesize_index (mm, addr, pte) \ + ({ \ + unsigned int psize; \ + if (is_kernel_addr(addr)) \ + psize = MMU_PAGE_4K; \ + else \ + psize = get_slice_psize(mm, addr); \ + psize; \ + })#else #define pte_pagesize_index (mm, addr, pte) MMU_PAGE_4K#endif
arch/powerpc/include/asm/rtas.h +1 -0
@@ -255,6 +255,7 @@ extern void rtas_power_off(void);extern void rtas_halt (void );extern void rtas_os_term (char *str);extern int rtas_get_sensor (int sensor,int index,int *state); +extern int rtas_get_sensor_fast (int sensor,int index,int *state);extern int rtas_get_power_level (int powerdomain,int *level);extern int rtas_set_power_level (int powerdomain,int level,int *setlevel);extern bool rtas_indicator_present (int token,int *maxindex);
arch/powerpc/kernel/rtas.c +17 -0
@@ -584,6 +584,23 @@ int rtas_get_sensor(int sensor, int index, int *state) }EXPORT_SYMBOL (rtas_get_sensor); +int rtas_get_sensor_fast (int sensor,int index,int *state) +{ +int token =rtas_token ("get-sensor-state" ); +int rc; + +if (token ==RTAS_UNKNOWN_SERVICE ) +return -ENOENT ; + + rc =rtas_call (token,2 ,2 , state, sensor, index); +WARN_ON (rc ==RTAS_BUSY || (rc >=RTAS_EXTENDED_DELAY_MIN && + rc <=RTAS_EXTENDED_DELAY_MAX )); + +if (rc <0 ) +return rtas_error_rc (rc); +return rc; +} +bool rtas_indicator_present (int token,int *maxindex) {int proplen, count, i;
arch/powerpc/platforms/pseries/ras.c +2 -1
@@ -187,7 +187,8 @@ static irqreturn_t ras_epow_interrupt(int irq, void *dev_id)int state;int critical; - status =rtas_get_sensor (EPOW_SENSOR_TOKEN ,EPOW_SENSOR_INDEX , &state); + status =rtas_get_sensor_fast (EPOW_SENSOR_TOKEN ,EPOW_SENSOR_INDEX , + &state);if (state >3 ) critical =1 ;/* Time Critical */
arch/x86/mm/init_32.c +1 -0
@@ -137,6 +137,7 @@ page_table_range_init_count(unsigned long start, unsigned long end) vaddr = start; pgd_idx =pgd_index (vaddr); + pmd_idx =pmd_index (vaddr);for ( ; (pgd_idx <PTRS_PER_PGD ) && (vaddr != end); pgd_idx++) { for (; (pmd_idx < PTRS_PER_PMD) && (vaddr != end);
arch/x86/net/bpf_jit_comp.c +6 -1
@@ -176,7 +176,12 @@ void bpf_jit_compile(struct sk_filter *fp) } cleanup_addr = proglen;/* epilogue address */ -for (pass =0 ; pass <10 ; pass++) { +/* JITed image shrinks with every pass and the loop iterates +* until the image stops shrinking. Very large bpf programs +* may converge on the last pass. In such case do one more +* pass to emit the final image +*/ +for (pass =0 ; pass <10 || image; pass++) {u8 seen_or_pass0 = (pass ==0 ) ? (SEEN_XREG |SEEN_DATAREF |SEEN_MEM ) : seen;/* no prologue/epilogue for trivial filters (RET something) */ proglen =0 ;
drivers/gpu/drm/radeon/radeon_combios.c +8 -0
@@ -3403,6 +3403,14 @@ void radeon_combios_asic_init(struct drm_device *dev) rdev->pdev->subsystem_device == 0x30ae)return ; +/* quirk for rs4xx HP Compaq dc5750 Small Form Factor to make it resume +* - it hangs on resume inside the dynclk 1 table. +*/ +if (rdev->family ==CHIP_RS480 && + rdev->pdev->subsystem_vendor ==0x103c && + rdev->pdev->subsystem_device ==0x280a ) +return ; +/* DYN CLK 1 */ table =combios_get_table_offset (dev,COMBIOS_DYN_CLK_1_TABLE );if (table)
drivers/iio/gyro/Kconfig +1 -2
@@ -73,8 +73,7 @@ config IIO_ST_GYRO_SPI_3AXIS config ITG3200 tristate "InvenSense ITG3200 Digital 3-Axis Gyroscope I2C driver" depends on I2C - select IIO_BUFFER - select IIO_TRIGGERED_BUFFER + select IIO_TRIGGERED_BUFFER if IIO_BUFFER help Say yes here to add support for the InvenSense ITG3200 digital 3-axis gyroscope sensor.
drivers/infiniband/core/uverbs.h +2 -1
@@ -69,7 +69,7 @@*/ struct ib_uverbs_device { -struct kref ref; +atomic_t refcount;int num_comp_vectors;struct completion comp;struct device *dev;
@@ -78,6 +78,7 @@ struct ib_uverbs_device {struct cdev cdev;struct rb_root xrcd_tree;struct mutex xrcd_tree_mutex; +struct kobject kobj; };struct ib_uverbs_event_file {
drivers/infiniband/core/uverbs_cmd.c +9 -1
@@ -2106,6 +2106,12 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, next->send_flags = user_wr->send_flags;if (is_ud) { +if (next->opcode !=IB_WR_SEND && + next->opcode !=IB_WR_SEND_WITH_IMM ) { + ret = -EINVAL ; + goto out_put; + } + next->wr.ud.ah =idr_read_ah (user_wr->wr.ud.ah, file->ucontext);if (!next->wr.ud.ah) {
@@ -2142,9 +2148,11 @@ ssize_t ib_uverbs_post_send(struct ib_uverbs_file *file, user_wr->wr.atomic.compare_add; next->wr.atomic.swap = user_wr->wr.atomic.swap; next->wr.atomic.rkey = user_wr->wr.atomic.rkey; +case IB_WR_SEND :break ;default : -break ; + ret = -EINVAL ; + goto out_put; } }
drivers/infiniband/core/uverbs_main.c +30 -13
125 lines not on this page · raw message
drivers/infiniband/hw/mlx4/ah.c +5 -1
@@ -169,9 +169,13 @@ int mlx4_ib_query_ah(struct ib_ah *ibah, struct ib_ah_attr *ah_attr)enum rdma_link_layer ll;memset (ah_attr,0 ,sizeof *ah_attr); - ah_attr->sl =be32_to_cpu (ah->av.ib.sl_tclass_flowlabel) >>28 ; ah_attr->port_num =be32_to_cpu (ah->av.ib.port_pd) >>24 ; ll =rdma_port_get_link_layer (ibah->device, ah_attr->port_num); +if (ll ==IB_LINK_LAYER_ETHERNET ) + ah_attr->sl =be32_to_cpu (ah->av.eth.sl_tclass_flowlabel) >>29 ; +else + ah_attr->sl =be32_to_cpu (ah->av.ib.sl_tclass_flowlabel) >>28 ; + ah_attr->dlid = ll ==IB_LINK_LAYER_INFINIBAND ?be16_to_cpu (ah->av.ib.dlid) :0 ;if (ah->av.ib.stat_rate) ah_attr->static_rate = ah->av.ib.stat_rate -MLX4_STAT_RATE_OFFSET ;
drivers/infiniband/hw/mlx4/sysfs.c +4 -1
@@ -563,6 +563,8 @@ static int add_port(struct mlx4_ib_dev *dev, int port_num, int slave)struct mlx4_port *p;int i;int ret; +int is_eth =rdma_port_get_link_layer (&dev->ib_dev, port_num) == +IB_LINK_LAYER_ETHERNET ; p =kzalloc (sizeof *p,GFP_KERNEL );if (!p)
@@ -580,7 +582,8 @@ static int add_port(struct mlx4_ib_dev *dev, int port_num, int slave) p->pkey_group.name ="pkey_idx" ; p->pkey_group.attrs = -alloc_group_attrs (show_port_pkey, store_port_pkey, +alloc_group_attrs (show_port_pkey, + is_eth ?NULL : store_port_pkey, dev->dev->caps.pkey_table_len[port_num]);if (!p->pkey_group.attrs) goto err_alloc;
drivers/isdn/gigaset/ser-gigaset.c +10 -1
@@ -524,9 +524,18 @@ gigaset_tty_open(struct tty_struct *tty) cs->hw.ser->tty = tty;atomic_set (&cs->hw.ser->refcnt,1 );init_completion (&cs->hw.ser->dead_cmp); - tty->disc_data = cs; +/* Set the amount of data we're willing to receive per call +* from the hardware driver to half of the input buffer size +* to leave some reserve. +* Note: We don't do flow control towards the hardware driver. +* If more data is received than will fit into the input buffer, +* it will be dropped and an error will be logged. This should +* never happen as the device is slow and the buffer size ample. +*/ + tty->receive_room =RBUFSIZE /2 ; +/* OK.. Initialization of the datastructures and the HW is done.. Now * startup system and notify the LL that we are ready to run */
drivers/md/raid10.c +4 -1
@@ -3578,6 +3578,7 @@ static struct r10conf *setup_conf(struct mddev *mddev)/* far_copies must be 1 */ conf->prev.stride = conf->dev_sectors; } + conf->reshape_safe = conf->reshape_progress;spin_lock_init (&conf->device_lock);INIT_LIST_HEAD (&conf->retry_list);
@@ -3785,7 +3786,6 @@ static int run(struct mddev *mddev) } conf->offset_diff = min_offset_diff; - conf->reshape_safe = conf->reshape_progress;clear_bit (MD_RECOVERY_SYNC , &mddev->recovery);clear_bit (MD_RECOVERY_CHECK , &mddev->recovery);set_bit (MD_RECOVERY_RESHAPE , &mddev->recovery);
@@ -4130,6 +4130,7 @@ static int raid10_start_reshape(struct mddev *mddev) conf->reshape_progress = size; }else conf->reshape_progress =0 ; + conf->reshape_safe = conf->reshape_progress;spin_unlock_irq (&conf->device_lock);if (mddev->delta_disks && mddev->bitmap) {
@@ -4196,6 +4197,7 @@ abort: rdev->new_data_offset = rdev->data_offset;smp_wmb (); conf->reshape_progress = MaxSector; + conf->reshape_safe = MaxSector; mddev->reshape_position = MaxSector;spin_unlock_irq (&conf->device_lock);return ret;
@@ -4543,6 +4545,7 @@ static void end_reshape(struct r10conf *conf)md_finish_reshape (conf->mddev);smp_wmb (); conf->reshape_progress = MaxSector; + conf->reshape_safe = MaxSector;spin_unlock_irq (&conf->device_lock);/* read-ahead size must cover two whole stripes, which is
drivers/media/rc/rc-main.c +0 -3
@@ -943,9 +943,6 @@ static int rc_dev_uevent(struct device *device, struct kobj_uevent_env *env) {struct rc_dev *dev =to_rc_dev (device); -if (!dev || !dev->input_dev) -return -ENODEV ; -if (dev->rc_map.name)ADD_HOTPLUG_VAR ("NAME=%s" , dev->rc_map.name);if (dev->driver_name)
drivers/mmc/core/core.c +4 -2
@@ -327,8 +327,10 @@ EXPORT_SYMBOL(mmc_start_bkops);*/ static void mmc_wait_data_done (struct mmc_request *mrq) { - mrq->host->context_info.is_done_rcv = true; -wake_up_interruptible (&mrq->host->context_info.wait); +struct mmc_context_info *context_info = &mrq->host->context_info; + + context_info->is_done_rcv = true; +wake_up_interruptible (&context_info->wait); }static void mmc_wait_done (struct mmc_request *mrq)
drivers/net/bonding/bond_main.c +1 -0
@@ -2188,6 +2188,7 @@ static int bond_release_and_destroy(struct net_device *bond_dev, bond_dev->priv_flags |=IFF_DISABLE_NETPOLL ;pr_info ("%s: destroying bond %s.\n" , bond_dev->name, bond_dev->name); +bond_remove_proc_entry (bond);unregister_netdevice (bond_dev); }return ret;
drivers/net/ethernet/broadcom/tg3.c +1 -1
@@ -10518,7 +10518,7 @@ static ssize_t tg3_show_temp(struct device *dev,tg3_ape_scratchpad_read (tp, &temperature, attr->index,sizeof (temperature));spin_unlock_bh (&tp->lock); -return sprintf (buf,"%u\n" , temperature); +return sprintf (buf,"%u\n" , temperature *1000 ); }
drivers/net/usb/usbnet.c +4 -3
@@ -753,7 +753,7 @@ int usbnet_stop (struct net_device *net) {struct usbnet *dev =netdev_priv (net);struct driver_info *info = dev->driver_info; -int retval, pm; +int retval, pm, mpn;clear_bit (EVENT_DEV_OPEN , &dev->flags);netif_stop_queue (net);
@@ -784,6 +784,8 @@ int usbnet_stop (struct net_device *net)usbnet_purge_paused_rxq (dev); + mpn = !test_and_clear_bit (EVENT_NO_RUNTIME_PM , &dev->flags); +/* deferred work (task, timer, softirq) must also stop. * can't flush_scheduled_work() until we drop rtnl (later), * else workers could deadlock; so make workers a NOP.
@@ -794,8 +796,7 @@ int usbnet_stop (struct net_device *net)if (!pm)usb_autopm_put_interface (dev->intf); -if (info->manage_power && - !test_and_clear_bit (EVENT_NO_RUNTIME_PM , &dev->flags)) +if (info->manage_power && mpn) info->manage_power (dev,0 );else usb_autopm_put_interface (dev->intf);
drivers/net/wireless/rtlwifi/rtl8192cu/sw.c +1 -0
@@ -313,6 +313,7 @@ static struct usb_device_id rtl8192c_usb_ids[] = { {RTL_USB_DEVICE(0x07b8, 0x8188, rtl92cu_hal_cfg)}, /*Abocom - Abocom*/ {RTL_USB_DEVICE(0x07b8, 0x8189, rtl92cu_hal_cfg)}, /*Funai - Abocom*/ {RTL_USB_DEVICE(0x0846, 0x9041, rtl92cu_hal_cfg)}, /*NetGear WNA1000M*/ + {RTL_USB_DEVICE(0x0846, 0x9043, rtl92cu_hal_cfg)}, /*NG WNA1000Mv2*/ {RTL_USB_DEVICE(0x0b05, 0x17ba, rtl92cu_hal_cfg)}, /*ASUS-Edimax*/ {RTL_USB_DEVICE(0x0bda, 0x5088, rtl92cu_hal_cfg)}, /*Thinkware-CC&C*/ {RTL_USB_DEVICE(0x0df6, 0x0052, rtl92cu_hal_cfg)}, /*Sitecom - Edimax*/
drivers/vhost/scsi.c +3 -3
@@ -1088,7 +1088,7 @@ static void tcm_vhost_send_evt(struct vhost_scsi *vs, struct tcm_vhost_tpg *tpg,* lun[4-7] need to be zero according to virtio-scsi spec. */ evt->event.lun[0 ] =0x01 ; - evt->event.lun[1 ] = tpg->tport_tpgt &0xFF ; + evt->event.lun[1 ] = tpg->tport_tpgt;if (lun->unpacked_lun >=256 ) evt->event.lun[2 ] = lun->unpacked_lun >>8 |0x40 ; evt->event.lun[3 ] = lun->unpacked_lun &0xFF ;
@@ -1894,12 +1894,12 @@ static struct se_portal_group *tcm_vhost_make_tpg(struct se_wwn *wwn, struct tcm_vhost_tport, tport_wwn);struct tcm_vhost_tpg *tpg; -unsigned long tpgt; +u16 tpgt;int ret;if (strstr (name,"tpgt_" ) != name)return ERR_PTR (-EINVAL ); -if (kstrtoul (name +5 ,10 , &tpgt) || tpgt >UINT_MAX ) +if (kstrtou16 (name +5 ,10 , &tpgt) || tpgt >=VHOST_SCSI_MAX_TARGET )return ERR_PTR (-EINVAL ); tpg =kzalloc (sizeof (struct tcm_vhost_tpg ),GFP_KERNEL );
drivers/xen/gntdev.c +20 -20
@@ -65,7 +65,7 @@ struct gntdev_priv {* Only populated if populate_freeable_maps == 1 */ struct list_head freeable_maps;/* lock protects maps and freeable_maps */ -spinlock_t lock; +struct mutex lock;struct mm_struct *mm;struct mmu_notifier mn; };
@@ -214,9 +214,9 @@ static void gntdev_put_map(struct gntdev_priv *priv, struct grant_map *map) }if (populate_freeable_maps && priv) { -spin_lock (&priv->lock); +mutex_lock (&priv->lock);list_del (&map->next); -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock); }if (map->pages && !use_ptemod)
@@ -392,9 +392,9 @@ static void gntdev_vma_close(struct vm_area_struct *vma)* not do any unmapping, since that has been done prior to * closing the vma, but it may still iterate the unmap_ops list. */ -spin_lock (&priv->lock); +mutex_lock (&priv->lock); map->vma =NULL ; -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock); } vma->vm_private_data =NULL ;gntdev_put_map (priv, map);
@@ -438,14 +438,14 @@ static void mn_invl_range_start(struct mmu_notifier *mn, struct gntdev_priv *priv = container_of(mn, struct gntdev_priv, mn);struct grant_map *map; -spin_lock (&priv->lock); +mutex_lock (&priv->lock);list_for_each_entry (map, &priv->maps, next) {unmap_if_in_range (map, start, end); }list_for_each_entry (map, &priv->freeable_maps, next) {unmap_if_in_range (map, start, end); } -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock); } static void mn_invl_page(struct mmu_notifier *mn,
@@ -462,7 +462,7 @@ static void mn_release(struct mmu_notifier *mn,struct grant_map *map;int err; -spin_lock (&priv->lock); +mutex_lock (&priv->lock);list_for_each_entry (map, &priv->maps, next) {if (!map->vma)continue ;
@@ -481,7 +481,7 @@ static void mn_release(struct mmu_notifier *mn, err =unmap_grant_pages (map,/* offset */ 0 , map->count);WARN_ON (err); } -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock); }static struct mmu_notifier_ops gntdev_mmu_ops = {
@@ -503,7 +503,7 @@ static int gntdev_open(struct inode *inode, struct file *flip)INIT_LIST_HEAD (&priv->maps);INIT_LIST_HEAD (&priv->freeable_maps); -spin_lock_init (&priv->lock); +mutex_init (&priv->lock);if (use_ptemod) { priv->mm =get_task_mm (current);
@@ -579,10 +579,10 @@ static long gntdev_ioctl_map_grant_ref(struct gntdev_priv *priv,return -EFAULT ; } -spin_lock (&priv->lock); +mutex_lock (&priv->lock);gntdev_add_map (priv, map); op.index = map->index <<PAGE_SHIFT ; -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);if (copy_to_user (u, &op,sizeof (op)) !=0 )return -EFAULT ;
@@ -601,7 +601,7 @@ static long gntdev_ioctl_unmap_grant_ref(struct gntdev_priv *priv,return -EFAULT ;pr_debug ("priv %p, del %d+%d\n" , priv, (int )op.index, (int )op.count); -spin_lock (&priv->lock); +mutex_lock (&priv->lock); map =gntdev_find_map_index (priv, op.index >>PAGE_SHIFT , op.count);if (map) {list_del (&map->next);
@@ -609,7 +609,7 @@ static long gntdev_ioctl_unmap_grant_ref(struct gntdev_priv *priv,list_add_tail (&map->next, &priv->freeable_maps); err =0 ; } -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);if (map)gntdev_put_map (priv, map);return err;
@@ -677,7 +677,7 @@ static long gntdev_ioctl_notify(struct gntdev_priv *priv, void __user *u) out_flags = op.action; out_event = op.event_channel_port; -spin_lock (&priv->lock); +mutex_lock (&priv->lock);list_for_each_entry (map, &priv->maps, next) {uint64_t begin = map->index <<PAGE_SHIFT ;
@@ -705,7 +705,7 @@ static long gntdev_ioctl_notify(struct gntdev_priv *priv, void __user *u) rc =0 ; unlock_out: -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);/* Drop the reference to the event channel we did not save in the map */ if (out_flags &UNMAP_NOTIFY_SEND_EVENT )
@@ -755,7 +755,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)pr_debug ("map %d+%d at %lx (pgoff %lx)\n" , index, count, vma->vm_start, vma->vm_pgoff); -spin_lock (&priv->lock); +mutex_lock (&priv->lock); map =gntdev_find_map_index (priv, index, count);if (!map) goto unlock_out;
@@ -790,7 +790,7 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma) map->flags |= GNTMAP_readonly; } -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);if (use_ptemod) { err = apply_to_page_range(vma->vm_mm, vma->vm_start,
@@ -818,11 +818,11 @@ static int gntdev_mmap(struct file *flip, struct vm_area_struct *vma)return 0 ; unlock_out: -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock);return err; out_unlock_put: -spin_unlock (&priv->lock); +mutex_unlock (&priv->lock); out_put_map:if (use_ptemod) map->vma =NULL ;
fs/coredump.c +32 -6
@@ -491,10 +491,10 @@ void do_coredump(siginfo_t *siginfo)const struct cred *old_cred;struct cred *cred;int retval =0 ; -int flag =0 ;int ispipe;struct files_struct *displaced; -bool need_nonrelative = false; +/* require nonrelative corefile path and be extra careful */ +bool need_suid_safe = false;bool core_dumped = false;static atomic_t core_dump_count =ATOMIC_INIT (0 );struct coredump_params cprm = {
@@ -528,9 +528,8 @@ void do_coredump(siginfo_t *siginfo)*/ if (__get_dumpable (cprm.mm_flags) ==SUID_DUMP_ROOT ) {/* Setuid core dump mode */ - flag =O_EXCL ;/* Stop rewrite attacks */ cred->fsuid =GLOBAL_ROOT_UID ;/* Dump root private */ - need_nonrelative = true; + need_suid_safe = true; } retval =coredump_wait (siginfo->si_signo, &core_state);
@@ -611,7 +610,7 @@ void do_coredump(siginfo_t *siginfo)if (cprm.limit < binfmt->min_coredump) goto fail_unlock; -if (need_nonrelative && cn.corename[0 ] !='/' ) { +if (need_suid_safe && cn.corename[0 ] !='/' ) {printk (KERN_WARNING "Pid %d(%s) can only dump core " \"to fully qualified path!\n" ,task_tgid_vnr (current), current->comm);
@@ -619,8 +618,35 @@ void do_coredump(siginfo_t *siginfo) goto fail_unlock; } +/* +* Unlink the file if it exists unless this is a SUID +* binary - in that case, we're running around with root +* privs and don't want to unlink another user's coredump. +*/ +if (!need_suid_safe) { +mm_segment_t old_fs; + + old_fs =get_fs (); +set_fs (KERNEL_DS ); +/* +* If it doesn't exist, that's fine. If there's some +* other problem, we'll catch it at the filp_open(). +*/ + (void )sys_unlink ((const char __user *)cn.corename); +set_fs (old_fs); + } + +/* +* There is a race between unlinking and creating the +* file, but if that causes an EEXIST here, that's +* fine - another process raced with us while creating +* the corefile, and the other process won. To userspace, +* what matters is that at least one of the two processes +* writes its coredump successfully, not which one. +*/ cprm.file =filp_open (cn.corename, -O_CREAT |2 |O_NOFOLLOW |O_LARGEFILE | flag, +O_CREAT |2 |O_NOFOLLOW | +O_LARGEFILE |O_EXCL ,0600 );if (IS_ERR (cprm.file)) goto fail_unlock;
fs/dcache.c +0 -9
@@ -2569,15 +2569,6 @@ static int prepend_path(const struct path *path,return error; global_root: -/* -* Filesystems needing to implement special "root names" -* should do so with ->d_dname() -*/ -if (IS_ROOT (dentry) && - (dentry->d_name.len !=1 || dentry->d_name.name[0 ] !='/' )) { -WARN (1 ,"Root dentry has weird name <%.*s>\n" , - (int ) dentry->d_name.len, dentry->d_name.name); - }if (!slash) error =prepend (buffer, buflen,"/" ,1 );if (!error)
fs/hfs/bnode.c +4 -5
@@ -288,7 +288,6 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)page_cache_release (page); goto fail; } -page_cache_release (page); node->page[i] = page; }
@@ -398,11 +397,11 @@ node_error:void hfs_bnode_free (struct hfs_bnode *node) { -//int i; +int i; -//for (i = 0; i < node->tree->pages_per_bnode; i++) -// if (node->page[i]) -// page_cache_release(node->page[i]); +for (i =0 ; i < node->tree->pages_per_bnode; i++) +if (node->page[i]) +page_cache_release (node->page[i]);kfree (node); }
fs/hfs/brec.c +11 -9
@@ -131,13 +131,16 @@ skip:hfs_bnode_write (node, entry, data_off + key_len, entry_len);hfs_bnode_dump (node); -if (new_node) { -/* update parent key if we inserted a key -* at the start of the first node -*/ -if (!rec && new_node != node) -hfs_brec_update_parent (fd); +/* +* update parent key if we inserted a key +* at the start of the node and it is not the new node +*/ +if (!rec && new_node != node) { +hfs_bnode_read_key (node, fd->search_key, data_off + size); +hfs_brec_update_parent (fd); + } +if (new_node) {hfs_bnode_put (fd->bnode);if (!new_node->parent) {hfs_btree_inc_height (tree);
@@ -166,9 +169,6 @@ skip: goto again; } -if (!rec) -hfs_brec_update_parent (fd); -return 0 ; }
@@ -366,6 +366,8 @@ again:if (IS_ERR (parent))return PTR_ERR (parent);__hfs_brec_find (parent, fd); +if (fd->record <0 ) +return -ENOENT ;hfs_bnode_dump (parent); rec = fd->record;
fs/hfsplus/bnode.c +0 -3
@@ -456,7 +456,6 @@ static struct hfs_bnode *__hfs_bnode_create(struct hfs_btree *tree, u32 cnid)page_cache_release (page); goto fail; } -page_cache_release (page); node->page[i] = page; }
@@ -568,13 +567,11 @@ node_error:void hfs_bnode_free (struct hfs_bnode *node) { -#if 0 int i;for (i =0 ; i < node->tree->pages_per_bnode; i++)if (node->page[i])page_cache_release (node->page[i]); -#endif kfree (node); }
fs/nfs/nfs4proc.c +1 -1
@@ -2043,7 +2043,7 @@ static int _nfs4_do_open(struct inode *dir,if (status !=0 ) goto err_opendata_put; -if ((opendata->o_arg.open_flags &O_EXCL ) && +if ((opendata->o_arg.open_flags & (O_CREAT |O_EXCL )) == (O_CREAT |O_EXCL ) && (opendata->o_arg.createmode !=NFS4_CREATE_GUARDED )) {nfs4_exclusive_attrset (opendata, sattr);
fs/nfs/pagelist.c +2 -2
@@ -60,8 +60,8 @@ EXPORT_SYMBOL_GPL(nfs_pgheader_init);void nfs_set_pgio_error (struct nfs_pgio_header *hdr,int error,loff_t pos) {spin_lock (&hdr->lock); -if (pos < hdr->io_start + hdr->good_bytes) { -set_bit (NFS_IOHDR_ERROR , &hdr->flags); +if (!test_and_set_bit (NFS_IOHDR_ERROR , &hdr->flags) + || pos < hdr->io_start + hdr->good_bytes) {clear_bit (NFS_IOHDR_EOF , &hdr->flags); hdr->good_bytes = pos - hdr->io_start; hdr->error = error;
include/net/ip.h +1 -0
@@ -141,6 +141,7 @@ static inline struct sk_buff *ip_finish_skb(struct sock *sk, struct flowi4 *fl4) }/* datagram.c */ +int __ip4_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len);extern int ip4_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len);
include/net/netns/sctp.h +1 -0
@@ -31,6 +31,7 @@ struct netns_sctp {struct list_head addr_waitq;struct timer_list addr_wq_timer;struct list_head auto_asconf_splist; +/* Lock that protects both addr_waitq and auto_asconf_splist */ spinlock_t addr_wq_lock;/* Lock that protects the local_addr_list writers */
include/net/sctp/structs.h +4 -0
@@ -228,6 +228,10 @@ struct sctp_sock {atomic_t pd_mode;/* Receive to here while partial delivery is in effect. */ struct sk_buff_head pd_lobby; + +/* These must be the last fields, as they will skipped on copies, +* like on accept and peeloff operations +*/ struct list_head auto_asconf_list;int do_auto_asconf; };
kernel/fork.c +18 -10
@@ -1760,13 +1760,21 @@ static int check_unshare_flags(unsigned long unshare_flags) CLONE_NEWUSER|CLONE_NEWPID))return -EINVAL ;/* -* Not implemented, but pretend it works if there is nothing to -* unshare. Note that unsharing CLONE_THREAD or CLONE_SIGHAND -* needs to unshare vm. +* Not implemented, but pretend it works if there is nothing +* to unshare. Note that unsharing the address space or the +* signal handlers also need to unshare the signal queues (aka +* CLONE_THREAD). */ if (unshare_flags & (CLONE_THREAD |CLONE_SIGHAND |CLONE_VM )) { -/* FIXME: get_task_mm() increments ->mm_users */ -if (atomic_read (¤t->mm->mm_users) >1 ) +if (!thread_group_empty (current)) +return -EINVAL ; + } +if (unshare_flags & (CLONE_SIGHAND |CLONE_VM )) { +if (atomic_read (¤t->sighand->count) >1 ) +return -EINVAL ; + } +if (unshare_flags &CLONE_VM ) { +if (!current_is_single_threaded ())return -EINVAL ; }
@@ -1840,16 +1848,16 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)if (unshare_flags &CLONE_NEWPID ) unshare_flags |=CLONE_THREAD ;/* -* If unsharing a thread from a thread group, must also unshare vm. -*/ -if (unshare_flags &CLONE_THREAD ) - unshare_flags |=CLONE_VM ; -/* * If unsharing vm, must also unshare signal handlers. */ if (unshare_flags &CLONE_VM ) unshare_flags |=CLONE_SIGHAND ;/* +* If unsharing a signal handlers, must also unshare the signal queues. +*/ +if (unshare_flags &CLONE_SIGHAND ) + unshare_flags |=CLONE_THREAD ; +/* * If unsharing namespace, must also unshare filesystem information. */ if (unshare_flags &CLONE_NEWNS )
mm/vmscan.c +1 -1
@@ -925,7 +925,7 @@ cull_mlocked:if (PageSwapCache (page))try_to_free_swap (page);unlock_page (page); -putback_lru_page (page); +list_add (&page->lru, &ret_pages);continue ; activate_locked:
net/bridge/br_mdb.c +2 -1
@@ -345,7 +345,6 @@ static int br_mdb_add_group(struct net_bridge *br, struct net_bridge_port *port,return -ENOMEM ;rcu_assign_pointer (*pp, p); -br_mdb_notify (br->dev, port, group,RTM_NEWMDB );return 0 ; }
@@ -368,6 +367,7 @@ static int __br_mdb_add(struct net *net, struct net_bridge *br,if (!p || p->br != br || p->state ==BR_STATE_DISABLED )return -EINVAL ; +memset (&ip,0 ,sizeof (ip)); ip.proto = entry->addr.proto;if (ip.proto ==htons (ETH_P_IP )) ip.u.ip4 = entry->addr.u.ip4;
@@ -417,6 +417,7 @@ static int __br_mdb_del(struct net_bridge *br, struct br_mdb_entry *entry)if (timer_pending (&br->multicast_querier_timer))return -EBUSY ; +memset (&ip,0 ,sizeof (ip)); ip.proto = entry->addr.proto;if (ip.proto ==htons (ETH_P_IP )) ip.u.ip4 = entry->addr.u.ip4;
net/core/datagram.c +41 -4
82 lines not on this page · raw message
net/core/dev.c +14 -15
@@ -3443,8 +3443,6 @@ static int __netif_receive_skb_core(struct sk_buff *skb, bool pfmemalloc) pt_prev =NULL ; -rcu_read_lock (); - another_round: skb->skb_iif = skb->dev->ifindex;
@@ -3454,7 +3452,7 @@ another_round: skb->protocol == cpu_to_be16(ETH_P_8021AD)) { skb =vlan_untag (skb);if (unlikely (!skb)) - goto unlock; + goto out; }#ifdef CONFIG_NET_CLS_ACT
@@ -3479,7 +3477,7 @@ skip_taps:#ifdef CONFIG_NET_CLS_ACT skb =handle_ing (skb, &pt_prev, &ret, orig_dev);if (!skb) - goto unlock; + goto out; ncls:#endif
@@ -3494,7 +3492,7 @@ ncls:if (vlan_do_receive (&skb)) goto another_round;else if (unlikely (!skb)) - goto unlock; + goto out; } rx_handler =rcu_dereference (skb->dev->rx_handler);
@@ -3506,7 +3504,7 @@ ncls:switch (rx_handler (&skb)) {case RX_HANDLER_CONSUMED : ret =NET_RX_SUCCESS ; - goto unlock; + goto out;case RX_HANDLER_ANOTHER : goto another_round;case RX_HANDLER_EXACT :
@@ -3558,8 +3556,6 @@ drop: ret =NET_RX_DROP ; } -unlock: -rcu_read_unlock (); out:return ret; }
@@ -3606,29 +3602,30 @@ static int __netif_receive_skb(struct sk_buff *skb)*/ int netif_receive_skb (struct sk_buff *skb) { +int ret; +net_timestamp_check (netdev_tstamp_prequeue, skb);if (skb_defer_rx_timestamp (skb))return NET_RX_SUCCESS ; +rcu_read_lock (); +#ifdef CONFIG_RPS if (static_key_false (&rps_needed)) {struct rps_dev_flow voidflow, *rflow = &voidflow; -int cpu, ret; - -rcu_read_lock (); - - cpu =get_rps_cpu (skb->dev, skb, &rflow); +int cpu =get_rps_cpu (skb->dev, skb, &rflow);if (cpu >=0 ) { ret =enqueue_to_backlog (skb, cpu, &rflow->last_qtail);rcu_read_unlock ();return ret; } -rcu_read_unlock (); }#endif -return __netif_receive_skb (skb); + ret =__netif_receive_skb (skb); +rcu_read_unlock (); +return ret; }EXPORT_SYMBOL (netif_receive_skb);
@@ -4038,8 +4035,10 @@ static int process_backlog(struct napi_struct *napi, int quota)unsigned int qlen;while ((skb =__skb_dequeue (&sd->process_queue))) { +rcu_read_lock ();local_irq_enable ();__netif_receive_skb (skb); +rcu_read_unlock ();local_irq_disable ();input_queue_head_incr (sd);if (++work >= quota) {
net/core/fib_rules.c +9 -5
@@ -596,15 +596,17 @@ static int dump_rules(struct sk_buff *skb, struct netlink_callback *cb, {int idx =0 ;struct fib_rule *rule; +int err =0 ;rcu_read_lock ();list_for_each_entry_rcu (rule, &ops->rules_list, list) {if (idx < cb->args[1 ]) goto skip; -if (fib_nl_fill_rule (skb, rule,NETLINK_CB (cb->skb).portid, - cb->nlh->nlmsg_seq,RTM_NEWRULE , -NLM_F_MULTI , ops) <0 ) + err =fib_nl_fill_rule (skb, rule,NETLINK_CB (cb->skb).portid, + cb->nlh->nlmsg_seq,RTM_NEWRULE , +NLM_F_MULTI , ops); +if (err)break ; skip: idx++;
@@ -613,7 +615,7 @@ skip: cb->args[1 ] = idx;rules_ops_put (ops); -return skb->len; +return err; }static int fib_nl_dumprule (struct sk_buff *skb,struct netlink_callback *cb)
@@ -629,7 +631,9 @@ static int fib_nl_dumprule(struct sk_buff *skb, struct netlink_callback *cb)if (ops ==NULL )return -EAFNOSUPPORT ; -return dump_rules (skb, cb, ops); +dump_rules (skb, cb, ops); + +return skb->len; }rcu_read_lock ();
net/core/pktgen.c +3 -1
@@ -3377,8 +3377,10 @@ static int pktgen_thread_worker(void *arg)pktgen_rem_thread (t);/* Wait for kthread_stop */ -while (!kthread_should_stop ()) { +for (;;) {set_current_state (TASK_INTERRUPTIBLE ); +if (kthread_should_stop ()) +break ;schedule (); }__set_current_state (TASK_RUNNING );
net/ipv4/datagram.c +12 -4
@@ -20,7 +20,7 @@#include <net/route.h> #include <net/tcp_states.h> -int ip4_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len) +int __ip4_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len) {struct inet_sock *inet =inet_sk (sk);struct sockaddr_in *usin = (struct sockaddr_in *) uaddr;
@@ -39,8 +39,6 @@ int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)sk_dst_reset (sk); -lock_sock (sk); - oif = sk->sk_bound_dev_if; saddr = inet->inet_saddr;if (ipv4_is_multicast (usin->sin_addr.s_addr)) {
@@ -81,9 +79,19 @@ int ip4_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)sk_dst_set (sk, &rt->dst); err =0 ; out: -release_sock (sk);return err; } +EXPORT_SYMBOL (__ip4_datagram_connect); + +int ip4_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len) +{ +int res; + +lock_sock (sk); + res =__ip4_datagram_connect (sk, uaddr, addr_len); +release_sock (sk); +return res; +}EXPORT_SYMBOL (ip4_datagram_connect);/* Because UDP xmit path can manipulate sk_dst_cache without holding
net/ipv4/ip_fragment.c +5 -2
@@ -356,7 +356,7 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) ihl =ip_hdrlen (skb);/* Determine the position of this fragment. */ - end = offset + skb->len - ihl; + end = offset + skb->len -skb_network_offset (skb) - ihl; err = -EINVAL ;/* Is this the final fragment? */
@@ -386,7 +386,7 @@ static int ip_frag_queue(struct ipq *qp, struct sk_buff *skb) goto err; err = -ENOMEM ; -if (pskb_pull (skb, ihl) ==NULL ) +if (!pskb_pull (skb,skb_network_offset (skb) + ihl)) goto err; err =pskb_trim_rcsum (skb, end - offset);
@@ -627,6 +627,9 @@ static int ip_frag_reasm(struct ipq *qp, struct sk_buff *prev, iph->frag_off = qp->q.max_size ?htons (IP_DF ) :0 ; iph->tot_len =htons (len); iph->tos |= ecn; + +ip_send_check (iph); +IP_INC_STATS_BH (net,IPSTATS_MIB_REASMOKS ); qp->q.fragments =NULL ; qp->q.fragments_tail =NULL ;
net/ipv6/datagram.c +15 -5
@@ -40,7 +40,7 @@ static bool ipv6_mapped_addr_any(const struct in6_addr *a)return ipv6_addr_v4mapped (a) && (a->s6_addr32[3 ] ==0 ); } -int ip6_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len) +static int __ip6_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len) {struct sockaddr_in6 *usin = (struct sockaddr_in6 *) uaddr;struct inet_sock *inet =inet_sk (sk);
@@ -56,7 +56,7 @@ int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len)if (usin->sin6_family ==AF_INET ) {if (__ipv6_only_sock (sk))return -EAFNOSUPPORT ; - err =ip4_datagram_connect (sk, uaddr, addr_len); + err =__ip4_datagram_connect (sk, uaddr, addr_len); goto ipv4_connected; }
@@ -99,9 +99,9 @@ int ip6_datagram_connect(struct sock *sk, struct sockaddr *uaddr, int addr_len) sin.sin_addr.s_addr = daddr->s6_addr32[3 ]; sin.sin_port = usin->sin6_port; - err =ip4_datagram_connect (sk, - (struct sockaddr *) &sin, -sizeof (sin)); + err =__ip4_datagram_connect (sk, + (struct sockaddr *) &sin, +sizeof (sin)); ipv4_connected:if (err)
@@ -204,6 +204,16 @@ out:fl6_sock_release (flowlabel);return err; } + +int ip6_datagram_connect (struct sock *sk,struct sockaddr *uaddr,int addr_len) +{ +int res; + +lock_sock (sk); + res =__ip6_datagram_connect (sk, uaddr, addr_len); +release_sock (sk); +return res; +}EXPORT_SYMBOL_GPL (ip6_datagram_connect); void ipv6_icmp_error(struct sock *sk, struct sk_buff *skb, int err,
net/ipv6/exthdrs_offload.c +1 -1
@@ -36,6 +36,6 @@ out:return ret; out_rt: -inet_del_offload (&rthdr_offload,IPPROTO_ROUTING ); +inet6_del_offload (&rthdr_offload,IPPROTO_ROUTING ); goto out; }
net/ipv6/ip6_gre.c +1 -0
@@ -359,6 +359,7 @@ static void ip6gre_tunnel_uninit(struct net_device *dev)struct ip6gre_net *ign =net_generic (net, ip6gre_net_id);ip6gre_tunnel_unlink (ign,netdev_priv (dev)); +ip6_tnl_dst_reset (netdev_priv (dev));dev_put (dev); }
net/ipv6/ip6_input.c +3 -3
@@ -325,10 +325,10 @@ int ip6_mc_input(struct sk_buff *skb)if (offset <0 ) goto out; -if (!ipv6_is_mld (skb, nexthdr, offset)) - goto out; +if (ipv6_is_mld (skb, nexthdr, offset)) + deliver = true; - deliver = true; + goto out; }/* unknown RA - process it normally */ }
net/ipv6/ip6mr.c +1 -1
@@ -552,7 +552,7 @@ static void ipmr_mfc_seq_stop(struct seq_file *seq, void *v)if (it->cache == &mrt->mfc6_unres_queue)spin_unlock_bh (&mfc_unres_lock); -else if (it->cache == mrt->mfc6_cache_array) +else if (it->cache == &mrt->mfc6_cache_array[it->ct])read_unlock (&mrt_lock); }
net/mac80211/tx.c +0 -3
@@ -281,9 +281,6 @@ ieee80211_tx_h_check_assoc(struct ieee80211_tx_data *tx)if (tx->sdata->vif.type ==NL80211_IFTYPE_WDS )return TX_CONTINUE ; -if (tx->sdata->vif.type ==NL80211_IFTYPE_MESH_POINT ) -return TX_CONTINUE ; -if (tx->flags &IEEE80211_TX_PS_BUFFERED )return TX_CONTINUE ;
net/netlink/af_netlink.c +47 -32
120 lines not on this page · raw message
net/rds/info.c +1 -1
@@ -176,7 +176,7 @@ int rds_info_getsockopt(struct socket *sock, int optname, char __user *optval,/* check for all kinds of wrapping and the like */ start = (unsigned long )optval; -if (len <0 || len +PAGE_SIZE -1 < len || start + len < start) { +if (len <0 || len >INT_MAX -PAGE_SIZE +1 || start + len < start) { ret = -EINVAL ; goto out; }
net/sctp/protocol.c +41 -23
134 lines not on this page · raw message
net/sctp/socket.c +32 -11
102 lines not on this page · raw message
net/tipc/socket.c +1 -0
@@ -1528,6 +1528,7 @@ static int accept(struct socket *sock, struct socket *new_sock, int flags) res =tipc_create (sock_net (sock->sk), new_sock,0 ,0 );if (res) goto exit; +security_sk_clone (sock->sk, new_sock->sk); new_sk = new_sock->sk; new_tsock =tipc_sk (new_sk);
sound/pci/hda/patch_realtek.c +3 -3
@@ -1137,7 +1137,7 @@ static const struct hda_fixup alc880_fixups[] = {/* override all pins as BIOS on old Amilo is broken */ .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl []) { - {0x14 ,0x0121411f },/* HP */ + {0x14 ,0x0121401f },/* HP */ {0x15 ,0x99030120 },/* speaker */ {0x16 ,0x99030130 },/* bass speaker */ {0x17 ,0x411111f0 },/* N/A */
@@ -1157,7 +1157,7 @@ static const struct hda_fixup alc880_fixups[] = {/* almost compatible with FUJITSU, but no bass and SPDIF */ .type = HDA_FIXUP_PINS, .v.pins = (const struct hda_pintbl []) { - {0x14 ,0x0121411f },/* HP */ + {0x14 ,0x0121401f },/* HP */ {0x15 ,0x99030120 },/* speaker */ {0x16 ,0x411111f0 },/* N/A */ {0x17 ,0x411111f0 },/* N/A */
@@ -1365,7 +1365,7 @@ static const struct snd_pci_quirk alc880_fixup_tbl[] = {SND_PCI_QUIRK (0x161f ,0x203d ,"W810" ,ALC880_FIXUP_W810 ),SND_PCI_QUIRK (0x161f ,0x205d ,"Medion Rim 2150" ,ALC880_FIXUP_MEDION_RIM ),SND_PCI_QUIRK (0x1631 ,0xe011 ,"PB 13201056" ,ALC880_FIXUP_6ST_AUTOMUTE ), -SND_PCI_QUIRK (0x1734 ,0x107c ,"FSC F1734" ,ALC880_FIXUP_F1734 ), +SND_PCI_QUIRK (0x1734 ,0x107c ,"FSC Amilo M1437" ,ALC880_FIXUP_FUJITSU ),SND_PCI_QUIRK (0x1734 ,0x1094 ,"FSC Amilo M1451G" ,ALC880_FIXUP_FUJITSU ),SND_PCI_QUIRK (0x1734 ,0x10ac ,"FSC AMILO Xi 1526" ,ALC880_FIXUP_F1734 ), SND_PCI_QUIRK(0x1734, 0x10b0, "FSC Amilo Pi1556", ALC880_FIXUP_FUJITSU),