Linux 3.2.92
I'm announcing the release of the 3.2.92 kernel.
All users of the 3.2 kernel series should upgrade.
The updated 3.2.y git tree can be found at:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.2.y
and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git
The diff from 3.2.91 is attached to this message.
Ben.
------------
Makefile | 2 +- arch/powerpc/include/asm/qe.h | 1 + arch/x86/boot/boot.h | 2 +- arch/x86/mm/numa_32.c | 1 + arch/x86/um/ptrace_64.c | 2 +- drivers/Makefile | 1 + drivers/ata/libata-scsi.c | 8 ++ drivers/gpu/drm/i915/intel_display.c | 4 +- drivers/infiniband/core/uverbs_cmd.c | 13 +- drivers/infiniband/core/verbs.c | 8 +- drivers/media/dvb/dvb-usb/digitv.c | 4 + drivers/media/dvb/dvb-usb/dw2102.c | 170 ++++++++++++++++++++++-- drivers/media/dvb/dvb-usb/ttusb2.c | 36 ++++- drivers/media/rc/mceusb.c | 4 +- drivers/media/video/cx231xx/cx231xx-audio.c | 41 ++++-- drivers/media/video/cx231xx/cx231xx-cards.c | 156 ++++++++++++++-------- drivers/media/video/gspca/konica.c | 3 + drivers/media/video/ov2640.c | 6 +- drivers/media/video/pvrusb2/pvrusb2-eeprom.c | 13 +- drivers/media/video/usbvision/usbvision-video.c | 9 +- drivers/media/video/zr364xx.c | 8 ++ drivers/net/ethernet/freescale/ucc_geth.c | 8 +- drivers/net/wireless/ath/ath9k/hif_usb.c | 12 ++ drivers/net/wireless/zd1211rw/zd_usb.c | 3 + drivers/pci/pci-sysfs.c | 10 +- drivers/pci/pci.c | 9 +- drivers/pci/proc.c | 20 ++- drivers/pci/quirks.c | 24 ++++ drivers/power/pda_power.c | 44 +++--- drivers/tty/serial/sh-sci.c | 10 +- drivers/usb/class/cdc-acm.c | 13 +- drivers/usb/core/driver.c | 21 +++ drivers/usb/core/file.c | 9 +- drivers/usb/core/hub.c | 11 +- drivers/usb/host/xhci-mem.c | 2 +- drivers/video/Kconfig | 2 - drivers/video/Makefile | 1 + fs/cifs/cifssmb.c | 3 + fs/cifs/netmisc.c | 6 +- fs/timerfd.c | 17 ++- include/linux/netfilter/nf_conntrack_common.h | 9 ++ ipc/mqueue.c | 4 +- kernel/padata.c | 2 +- net/bluetooth/hci_sock.c | 3 +- net/ipv4/tcp_lp.c | 6 +- net/ipv6/exthdrs.c | 2 +- net/ipv6/ip6_output.c | 8 +- net/ipv6/ip6_tunnel.c | 4 +- net/netfilter/nf_conntrack_netlink.c | 27 +++- net/packet/af_packet.c | 13 +- 50 files changed, 606 insertions(+), 189 deletions(-)
Ajay Kaher (1):
USB: Proper handling of Race Condition when two USB class drivers try to call init_usb_class simultaneously
Alexander Tsoy (1):
ath9k_htc: add device ID for Toshiba WLM-20U2/GN-1080
Alexey Brodkin (1):
usb: Make sure usb/phy/of gets built-in
Alexey Khoroshilov (1):
cx231xx: fix double free and leaks on failure path in cx231xx_usb_probe()
Alyssa Milburn (4):
digitv: limit messages to buffer size
zr364xx: enforce minimum size when reading header
ttusb2: limit messages to buffer size
dw2102: limit messages to buffer size
Andrey Ryabinin (1):
drm/i915: fix use-after-free in page_flip_completed()
Arnd Bergmann (2):
pvrusb2: reduce stack usage pvr2_eeprom_analyze()
fbdev: sti: don't select CONFIG_VT
Ashish Kalra (1):
x86/boot: Fix BSS corruption/overwrite bug in early x86 kernel startup
Ben Hutchings (1):
Linux 3.2.92
Bjorn Helgaas (1):
PCI: Ignore write combining when mapping I/O port space
Christoph Hellwig (1):
libata: reject passthrough WRITE SAME requests
Christophe Leroy (1):
net: ethernet: ucc_geth: fix MEM_PART_MURAM mode
Cong Wang (1):
mqueue: fix a use-after-free in sys_mq_notify()
Craig Gallek (1):
ip6_tunnel: Fix missing tunnel encapsulation limit option
Dan Carpenter (2):
dw2102: some missing unlocks on error
cifs: small underflow in cnvrtDosUnixTm()
David S. Miller (1):
ipv6: Need to export ipv6_push_frag_opts for tunneling now.
David Woodhouse (3):
PCI: Fix pci_mmap_fits() for HAVE_PCI_RESOURCE_TO_USER platforms
PCI: Fix another sanity check bug in /proc/pci mmap
PCI: Only allow WC mmap on prefetchable resources
Dmitry Tunin (1):
ath9k_htc: Add support of AirTies 1eda:2315 AR9271 device
Eric Dumazet (1):
tcp: fix wraparound issue in tcp_lp
Frank Schaefer (1):
ov2640: fix vflip control
Guenter Roeck (2):
usb: hub: Fix error loop seen after hub communication errors
usb: hub: Do not attempt to autosuspend disconnected devices
Jason A. Donenfeld (1):
padata: free correct variable
Johan Hovold (8):
zd1211rw: fix NULL-deref at probe
mceusb: fix NULL-deref at probe
ath9k_htc: fix NULL-deref at probe
gspca: konica: add missing endpoint sanity check
usbvision: fix NULL-deref at probe
cx231xx-cards: fix NULL-deref at probe
cx231xx-audio: fix init error path
cx231xx-audio: fix NULL-deref at probe
Josh Boyer (1):
ttusb2: Don't use stack variables for DMA
Laura Abbott (1):
x86/mm/32: Set the '__vmalloc_start_set' flag in initmem_init()
Leon Nardella (1):
ath9k_htc: Add new USB ID
Liping Zhang (1):
netfilter: ctnetlink: make it safer when updating ct->status
Lukas Wunner (1):
PCI: Freeze PME scan before suspending devices
Masaki TAGAWA (1):
ath9k_htc: Add device ID for Buffalo WLI-UV-AG300P
Mauro Carvalho Chehab (1):
dw2102: Don't use dynamic static allocation
Michael J. Ruhl (2):
IB/core: If the MGID/MLID pair is not on the list return an error IB/core: For multicast functions, verify that LIDs are multicast LIDs
Michael Trimarchi (1):
power: supply: pda_power: move from timer to delayed_work
Mohammed Shafi Shajakhan (1):
ath9k_htc: Add PID/VID for a Ubiquiti WiFiStation
Peter Chen (1):
usb: host: xhci: print correct command ring address
Richard Weinberger (1):
um: Fix PTRACE_POKEUSER on x86_64
Sabrina Dubroca (1):
ipv6: avoid overflow of offset in ip6_find_1stfragopt
Stefan Assmann (1):
PCI: Disable boot interrupt quirk for ASUS M2N-LR
Steve French (1):
Set unicode flag on cifs echo request to avoid Mac error
Sujith Manoharan (1):
ath9k_htc: Add Panasonic N5HBZ0000055 device id
Szymon Janc (1):
Bluetooth: Fix user channel for 32bit userspace on 64bit kernel
Takatoshi Akiyama (1):
serial: sh-sci: Fix panic when serial console and DMA are enabled
Thomas Gleixner (1):
timerfd: Protect the might cancel mechanism proper
Tobias Herzog (1):
cdc-acm: fix possible invalid access when processing notification
Willem de Bruijn (1):
packet: fix tp_reserve race in packet_set_ring
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 2 -SUBLEVEL = 91 +SUBLEVEL = 92 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/powerpc/include/asm/qe.h +1 -0
@@ -193,6 +193,7 @@ static inline int qe_alive_during_sleep(void)#define qe_muram_free cpm_muram_free#define qe_muram_addr cpm_muram_addr#define qe_muram_offset cpm_muram_offset +#define qe_muram_dma cpm_muram_dma/* Structure that defines QE firmware binary files. *
arch/x86/boot/boot.h +1 -1
@@ -16,7 +16,7 @@#ifndef BOOT_BOOT_H #define BOOT_BOOT_H -#define STACK_SIZE 512/* Minimum number of bytes for stack */ +#define STACK_SIZE 1024/* Minimum number of bytes for stack */ #ifndef __ASSEMBLY__
arch/x86/mm/numa_32.c +1 -0
@@ -261,5 +261,6 @@ void __init initmem_init(void)printk (KERN_DEBUG "High memory starts at vaddr %08lx\n" , (ulong )pfn_to_kaddr (highstart_pfn)); + __vmalloc_start_set = true;setup_bootmem_allocator (); }
arch/x86/um/ptrace_64.c +1 -1
@@ -120,7 +120,7 @@ int poke_user(struct task_struct *child, long addr, long data) else if ((addr >= offsetof(struct user, u_debugreg[0])) && (addr <= offsetof(struct user, u_debugreg[7]))) { addr -= offsetof(struct user, u_debugreg[0]); - addr = addr >>2 ; + addr = addr >>3 ;if ((addr ==4 ) || (addr ==5 ))return -EIO ; child->thread.arch.debugregs[addr] = data;
drivers/Makefile +1 -0
@@ -73,6 +73,7 @@ obj-$(CONFIG_USB_OTG_UTILS) += usb/ obj-$(CONFIG_USB) += usb/ obj-$(CONFIG_PCI) += usb/ obj-$(CONFIG_USB_GADGET) += usb/ +obj-$(CONFIG_OF) += usb/ obj-$(CONFIG_SERIO) += input/serio/ obj-$(CONFIG_GAMEPORT) += input/gameport/ obj-$(CONFIG_INPUT) += input/
drivers/ata/libata-scsi.c +8 -0
@@ -3056,6 +3056,14 @@ static unsigned int ata_scsi_write_same_xlat(struct ata_queued_cmd *qc)if (unlikely (!dev->dma_mode)) goto invalid_fld; +/* +* We only allow sending this command through the block layer, +* as it modifies the DATA OUT buffer, which would corrupt user +* memory for SG_IO commands. +*/ +if (unlikely (scmd->request->cmd_type !=REQ_TYPE_FS )) + goto invalid_fld; +if (unlikely (scmd->cmd_len <16 )) goto invalid_fld;scsi_16_lba_len (cdb, &block, &n_block);
drivers/gpu/drm/i915/intel_display.c +2 -2
@@ -6995,9 +6995,9 @@ static void do_intel_finish_page_flip(struct drm_device *dev, &obj->pending_flip.counter);wake_up (&dev_priv->pending_flip_queue); -schedule_work (&work->work); -trace_i915_flip_complete (intel_crtc->plane, work->pending_flip_obj); + +schedule_work (&work->work); }void intel_finish_page_flip (struct drm_device *dev,int pipe)
drivers/infiniband/core/uverbs_cmd.c +9 -4
@@ -2440,6 +2440,7 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file,struct ib_qp *qp;struct ib_uverbs_mcast_entry *mcast;int ret = -EINVAL ; +bool found = false;if (copy_from_user (&cmd, buf,sizeof cmd))return -EFAULT ;
@@ -2448,10 +2449,6 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file,if (!qp)return -EINVAL ; - ret =ib_detach_mcast (qp, (union ib_gid *) cmd.gid, cmd.mlid); -if (ret) - goto out_put; - obj = container_of(qp->uobject, struct ib_uqp_object, uevent.uobject);list_for_each_entry (mcast, &obj->mcast_list, list)
@@ -2459,9 +2456,17 @@ ssize_t ib_uverbs_detach_mcast(struct ib_uverbs_file *file, !memcmp(cmd.gid, mcast->gid.raw, sizeof mcast->gid.raw)) {list_del (&mcast->list);kfree (mcast); + found = true;break ; } +if (!found) { + ret = -EINVAL ; + goto out_put; + } + + ret =ib_detach_mcast (qp, (union ib_gid *)cmd.gid, cmd.mlid); + out_put:put_qp_write (qp);
drivers/infiniband/core/verbs.c +6 -2
@@ -1185,7 +1185,9 @@ int ib_attach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid) {if (!qp->device->attach_mcast)return -ENOSYS ; -if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD ) +if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD || + lid <0xC000 || + lid ==be16_to_cpu (IB_LID_PERMISSIVE ))return -EINVAL ;return qp->device->attach_mcast (qp, gid, lid);
@@ -1196,7 +1198,9 @@ int ib_detach_mcast(struct ib_qp *qp, union ib_gid *gid, u16 lid) {if (!qp->device->detach_mcast)return -ENOSYS ; -if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD ) +if (gid->raw[0 ] !=0xff || qp->qp_type !=IB_QPT_UD || + lid <0xC000 || + lid ==be16_to_cpu (IB_LID_PERMISSIVE ))return -EINVAL ;return qp->device->detach_mcast (qp, gid, lid);
drivers/media/dvb/dvb-usb/digitv.c +4 -0
@@ -30,6 +30,10 @@ static int digitv_ctrl_msg(struct dvb_usb_device *d, {int wo = (rbuf ==NULL || rlen ==0 );/* write-only */ u8 sndbuf[7 ],rcvbuf[7 ]; + +if (wlen >4 || rlen >4 ) +return -EIO ; +memset (sndbuf,0 ,7 );memset (rcvbuf,0 ,7 ); sndbuf[0 ] = cmd;
drivers/media/dvb/dvb-usb/dw2102.c +156 -14
292 lines not on this page · raw message
drivers/media/dvb/dvb-usb/ttusb2.c +34 -2
@@ -75,10 +75,21 @@ static int ttusb2_msg(struct dvb_usb_device *d, u8 cmd, u8 *wbuf, int wlen, u8 *rbuf, int rlen) { struct ttusb2_state *st = d->priv; -u8 s[wlen+4 ],r[64 ] = {0 }; +u8 *s, *r =NULL ;int ret =0 ; -memset (s,0 ,wlen+4 ); +if (4 + rlen >64 ) +return -EIO ; + + s =kzalloc (wlen+4 ,GFP_KERNEL ); +if (!s) +return -ENOMEM ; + + r =kzalloc (64 ,GFP_KERNEL ); +if (!r) { +kfree (s); +return -ENOMEM ; + } s[0 ] =0xaa ; s[1 ] = ++st->id;
@@ -94,12 +105,17 @@ static int ttusb2_msg(struct dvb_usb_device *d, u8 cmd, r[2] != cmd || (rlen > 0 && r[3] != rlen)) {warn ("there might have been an error during control message transfer. (rlen = %d, was %d)" ,rlen,r[3 ]); +kfree (s); +kfree (r);return -EIO ; }if (rlen >0 )memcpy (rbuf, &r[4 ], rlen); +kfree (s); +kfree (r); +return 0 ; }
@@ -368,6 +384,22 @@ static int ttusb2_i2c_xfer(struct i2c_adapter *adap,struct i2c_msg msg[],int num write_read = i+1 < num && (msg[i+1 ].flags &I2C_M_RD ); read = msg[i].flags &I2C_M_RD ; +if (3 + msg[i].len >sizeof (obuf)) { +err ("i2c wr len=%d too high" , msg[i].len); +break ; + } +if (write_read) { +if (3 + msg[i+1 ].len >sizeof (ibuf)) { +err ("i2c rd len=%d too high" , msg[i+1 ].len); +break ; + } + }else if (read) { +if (3 + msg[i].len >sizeof (ibuf)) { +err ("i2c rd len=%d too high" , msg[i].len); +break ; + } + } + obuf[0 ] = (msg[i].addr <<1 ) | (write_read | read);if (read) obuf[1 ] =0 ;
drivers/media/rc/mceusb.c +2 -2
@@ -1301,8 +1301,8 @@ static int __devinit mceusb_dev_probe(struct usb_interface *intf, "found\n"); } } -if (ep_in ==NULL ) { -mce_dbg (&intf->dev,"inbound and/or endpoint not found\n" ); +if (!ep_in || !ep_out) { +mce_dbg (&intf->dev,"required endpoints not found\n" );return -ENODEV ; }
drivers/media/video/cx231xx/cx231xx-audio.c +28 -13
75 lines not on this page · raw message
drivers/media/video/cx231xx/cx231xx-cards.c +97 -59
286 lines not on this page · raw message
drivers/media/video/gspca/konica.c +3 -0
@@ -290,6 +290,9 @@ static int sd_start(struct gspca_dev *gspca_dev)return -EIO ; } +if (alt->desc.bNumEndpoints <2 ) +return -ENODEV ; + packet_size =le16_to_cpu (alt->endpoint[0 ].desc.wMaxPacketSize);reg_w (gspca_dev, sd->brightness,BRIGHTNESS_REG );
drivers/media/video/ov2640.c +4 -2
@@ -687,8 +687,10 @@ static int ov2640_s_ctrl(struct v4l2_ctrl *ctrl)switch (ctrl->id) {case V4L2_CID_VFLIP : - val = ctrl->val ?REG04_VFLIP_IMG :0x00 ; -return ov2640_mask_set (client,REG04 ,REG04_VFLIP_IMG , val); + val = ctrl->val ?REG04_VFLIP_IMG |REG04_VREF_EN :0x00 ; +return ov2640_mask_set (client,REG04 , +REG04_VFLIP_IMG |REG04_VREF_EN , val); +/* NOTE: REG04_VREF_EN: 1 line shift / even/odd line swap */ case V4L2_CID_HFLIP : val = ctrl->val ?REG04_HFLIP_IMG :0x00 ;return ov2640_mask_set (client,REG04 ,REG04_HFLIP_IMG , val);
drivers/media/video/pvrusb2/pvrusb2-eeprom.c +4 -9
@@ -123,15 +123,10 @@ int pvr2_eeprom_analyze(struct pvr2_hdw *hdw)memset (&tvdata,0 ,sizeof (tvdata)); eeprom =pvr2_eeprom_fetch (hdw); -if (!eeprom)return -EINVAL ; - - { -struct i2c_client fake_client; -/* Newer version expects a useless client interface */ - fake_client.addr = hdw->eeprom_addr; - fake_client.adapter = &hdw->i2c_adap; -tveeprom_hauppauge_analog (&fake_client,&tvdata,eeprom); - } +if (!eeprom) +return -EINVAL ; + +tveeprom_hauppauge_analog (NULL , &tvdata, eeprom);trace_eeprom ("eeprom assumed v4l tveeprom module" );trace_eeprom ("eeprom direct call results:" );
drivers/media/video/usbvision/usbvision-video.c +8 -1
@@ -1564,7 +1564,14 @@ static int __devinit usbvision_probe(struct usb_interface *intf, }for (i =0 ; i < usbvision->num_alt; i++) { -u16 tmp =le16_to_cpu (uif->altsetting[i].endpoint[1 ].desc. +u16 tmp; + +if (uif->altsetting[i].desc.bNumEndpoints <2 ) { + ret = -ENODEV ; + goto err_pkt; + } + + tmp =le16_to_cpu (uif->altsetting[i].endpoint[1 ].desc. wMaxPacketSize); usbvision->alt_max_pkt_size[i] = (tmp &0x07ff ) * (((tmp &0x1800 ) >>11 ) +1 );
drivers/media/video/zr364xx.c +8 -0
@@ -611,6 +611,14 @@ static int zr364xx_read_video_callback(struct zr364xx_camera *cam, ptr = pdest = frm->lpvbits;if (frm->ulState ==ZR364XX_READ_IDLE ) { +if (purb->actual_length <128 ) { +/* header incomplete */ +dev_info (&cam->udev->dev, +"%s: buffer (%d bytes) too small to hold jpeg header. Discarding.\n" , + __func__, purb->actual_length); +return -EINVAL ; + } + frm->ulState =ZR364XX_READ_FRAME ; frm->cur_size =0 ;
drivers/net/ethernet/freescale/ucc_geth.c +3 -5
@@ -2591,11 +2591,10 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) }else if (ugeth->ug_info->uf_info.bd_mem_part ==MEM_PART_MURAM ) {out_be32 (&ugeth->p_send_q_mem_reg->sqqd[i].bd_ring_base, - (u32 )immrbar_virt_to_phys (ugeth-> - p_tx_bd_ring[i])); + (u32 )qe_muram_dma (ugeth->p_tx_bd_ring[i]));out_be32 (&ugeth->p_send_q_mem_reg->sqqd[i]. last_bd_completed_address, - (u32 )immrbar_virt_to_phys (endOfRing)); + (u32 )qe_muram_dma (endOfRing)); } }
@@ -2856,8 +2855,7 @@ static int ucc_geth_startup(struct ucc_geth_private *ugeth) }else if (ugeth->ug_info->uf_info.bd_mem_part ==MEM_PART_MURAM ) {out_be32 (&ugeth->p_rx_bd_qs_tbl[i].externalbdbaseptr, - (u32 )immrbar_virt_to_phys (ugeth-> - p_rx_bd_ring[i])); + (u32 )qe_muram_dma (ugeth->p_rx_bd_ring[i])); }/* rest of fields handled by QE */ }
drivers/net/wireless/ath/ath9k/hif_usb.c +12 -0
@@ -38,7 +38,10 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { { USB_DEVICE(0x04CA, 0x4605) }, /* Liteon */ { USB_DEVICE(0x040D, 0x3801) }, /* VIA */ { USB_DEVICE(0x0cf3, 0xb003) }, /* Ubiquiti WifiStation Ext */ + { USB_DEVICE(0x0cf3, 0xb002) }, /* Ubiquiti WifiStation */ { USB_DEVICE(0x057c, 0x8403) }, /* AVM FRITZ!WLAN 11N v2 USB */ + { USB_DEVICE(0x0471, 0x209e) }, /* Philips (or NXP) PTA01 */ + { USB_DEVICE(0x1eda, 0x2315) }, /* AirTies */ { USB_DEVICE(0x0cf3, 0x7015), .driver_info = AR9287_USB }, /* Atheros */
@@ -53,6 +56,12 @@ static struct usb_device_id ath9k_hif_usb_ids[] = { .driver_info = AR9280_USB }, /* SMC Networks */ { USB_DEVICE(0x0411, 0x017f), .driver_info = AR9280_USB }, /* Sony UWA-BR100 */ + { USB_DEVICE(0x0411, 0x0197), + .driver_info = AR9280_USB }, /* Buffalo WLI-UV-AG300P */ + { USB_DEVICE(0x04da, 0x3904), + .driver_info = AR9280_USB }, + { USB_DEVICE(0x0930, 0x0a08), + .driver_info = AR9280_USB }, /* Toshiba WLM-20U2 and GN-1080 */ { USB_DEVICE(0x0cf3, 0x20ff), .driver_info = STORAGE_DEVICE },
@@ -1095,6 +1104,9 @@ static int send_eject_command(struct usb_interface *interface)u8 bulk_out_ep;int r; +if (iface_desc->desc.bNumEndpoints <2 ) +return -ENODEV ; +/* Find bulk out endpoint */ for (r =1 ; r >=0 ; r--) { endpoint = &iface_desc->endpoint[r].desc;
drivers/net/wireless/zd1211rw/zd_usb.c +3 -0
@@ -1281,6 +1281,9 @@ static int eject_installer(struct usb_interface *intf)u8 bulk_out_ep;int r; +if (iface_desc->desc.bNumEndpoints <2 ) +return -ENODEV ; +/* Find bulk out endpoint */ for (r =1 ; r >=0 ; r--) { endpoint = &iface_desc->endpoint[r].desc;
drivers/pci/pci-sysfs.c +7 -3
@@ -772,15 +772,19 @@ void pci_remove_legacy_files(struct pci_bus *b)int pci_mmap_fits (struct pci_dev *pdev,int resno,struct vm_area_struct *vma,enum pci_mmap_api mmap_api) { -unsigned long nr, start, size, pci_start; +unsigned long nr, start, size; +resource_size_t pci_start =0 , pci_end;if (pci_resource_len (pdev, resno) ==0 )return 0 ; nr = (vma->vm_end - vma->vm_start) >>PAGE_SHIFT ; start = vma->vm_pgoff; size = ((pci_resource_len (pdev, resno) -1 ) >>PAGE_SHIFT ) +1 ; - pci_start = (mmap_api ==PCI_MMAP_PROCFS ) ? -pci_resource_start (pdev, resno) >>PAGE_SHIFT :0 ; +if (mmap_api ==PCI_MMAP_PROCFS ) { +pci_resource_to_user (pdev, resno, &pdev->resource[resno], + &pci_start, &pci_end); + pci_start >>=PAGE_SHIFT ; + }if (start >= pci_start && start < pci_start + size && start + nr <= pci_start + size)return 1 ;
drivers/pci/pci.c +5 -4
@@ -1478,8 +1478,8 @@ static void pci_pme_list_scan(struct work_struct *work) } }if (!list_empty (&pci_pme_list)) -schedule_delayed_work (&pci_pme_work, -msecs_to_jiffies (PME_TIMEOUT )); +queue_delayed_work (system_freezable_wq, &pci_pme_work, +msecs_to_jiffies (PME_TIMEOUT )); }mutex_unlock (&pci_pme_list_mutex); }
@@ -1528,8 +1528,9 @@ void pci_pme_active(struct pci_dev *dev, bool enable)mutex_lock (&pci_pme_list_mutex);list_add (&pme_dev->list, &pci_pme_list);if (list_is_singular (&pci_pme_list)) -schedule_delayed_work (&pci_pme_work, -msecs_to_jiffies (PME_TIMEOUT )); +queue_delayed_work (system_freezable_wq, + &pci_pme_work, +msecs_to_jiffies (PME_TIMEOUT ));mutex_unlock (&pci_pme_list_mutex); }else {mutex_lock (&pci_pme_list_mutex);
drivers/pci/proc.c +16 -4
@@ -249,23 +249,35 @@ static int proc_bus_pci_mmap(struct file *file, struct vm_area_struct *vma)const struct proc_dir_entry *dp =PDE (inode);struct pci_dev *dev = dp->data;struct pci_filp_private *fpriv = file->private_data; -int i, ret; +int i, ret, write_combine =0 , res_bit;if (!capable (CAP_SYS_RAWIO ))return -EPERM ; +if (fpriv->mmap_state == pci_mmap_io) + res_bit =IORESOURCE_IO ; +else + res_bit =IORESOURCE_MEM ; +/* Make sure the caller is mapping a real resource for this device */ for (i =0 ; i <PCI_ROM_RESOURCE ; i++) { -if (pci_mmap_fits (dev, i, vma,PCI_MMAP_PROCFS )) +if (dev->resource[i].flags & res_bit && +pci_mmap_fits (dev, i, vma,PCI_MMAP_PROCFS ))break ; }if (i >=PCI_ROM_RESOURCE )return -ENODEV ; +if (fpriv->mmap_state == pci_mmap_mem && + fpriv->write_combine) { +if (dev->resource[i].flags &IORESOURCE_PREFETCH ) + write_combine =1 ; +else +return -EINVAL ; + } ret =pci_mmap_page_range (dev, vma, - fpriv->mmap_state, - fpriv->write_combine); + fpriv->mmap_state, write_combine);if (ret <0 )return ret;
drivers/pci/quirks.c +24 -0
@@ -1733,6 +1733,29 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260a, quirk_intel_pcie_pm);DECLARE_PCI_FIXUP_FINAL (PCI_VENDOR_ID_INTEL ,0x260b , quirk_intel_pcie_pm);#ifdef CONFIG_X86_IO_APIC +static int dmi_disable_ioapicreroute (const struct dmi_system_id *d) +{ + noioapicreroute =1 ; +pr_info ("%s detected: disable boot interrupt reroute\n" , d->ident); + +return 0 ; +} + +static struct dmi_system_id boot_interrupt_dmi_table[] = { +/* +* Systems to exclude from boot interrupt reroute quirks +*/ + { + .callback = dmi_disable_ioapicreroute, + .ident ="ASUSTek Computer INC. M2N-LR" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"ASUSTek Computer INC." ), +DMI_MATCH (DMI_PRODUCT_NAME ,"M2N-LR" ), + }, + }, + {} +}; +/* * Boot interrupts on some chipsets cannot be turned off. For these chipsets, * remap the original interrupt in the linux kernel to the boot interrupt, so
@@ -1741,6 +1764,7 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x260b, quirk_intel_pcie_pm);*/ static void quirk_reroute_to_boot_interrupts_intel (struct pci_dev *dev) { +dmi_check_system (boot_interrupt_dmi_table);if (noioapicquirk || noioapicreroute)return ;
drivers/power/pda_power.c +24 -20
98 lines not on this page · raw message
drivers/tty/serial/sh-sci.c +6 -4
@@ -1579,11 +1579,13 @@ static int sci_startup(struct uart_port *port)sci_port_enable (s); +sci_request_dma (port); + ret =sci_request_irq (s); -if (unlikely (ret <0 )) +if (unlikely (ret <0 )) { +sci_free_dma (port);return ret; - -sci_request_dma (port); + }sci_start_tx (port);sci_start_rx (port);
@@ -1600,8 +1602,8 @@ static void sci_shutdown(struct uart_port *port)sci_stop_rx (port);sci_stop_tx (port); -sci_free_dma (port);sci_free_irq (s); +sci_free_dma (port);sci_port_disable (s); }
drivers/usb/class/cdc-acm.c +9 -4
@@ -293,6 +293,12 @@ static void acm_ctrl_irq(struct urb *urb)break ;case USB_CDC_NOTIFY_SERIAL_STATE : +if (le16_to_cpu (dr->wLength) !=2 ) { +dev_dbg (&acm->control->dev, +"%s - malformed serial state\n" , __func__); +break ; + } + tty =tty_port_tty_get (&acm->port); newctrl =get_unaligned_le16 (data);
@@ -323,11 +329,10 @@ static void acm_ctrl_irq(struct urb *urb)default :dev_dbg (&acm->control->dev, -"%s - unknown notification %d received: index %d " -"len %d data0 %d data1 %d\n" , +"%s - unknown notification %d received: index %d len %d\n" , __func__, - dr->bNotificationType, dr->wIndex, - dr->wLength, data[0 ], data[1 ]); + dr->bNotificationType, dr->wIndex, dr->wLength); +break ; } exit:
drivers/usb/core/driver.c +21 -0
@@ -1218,6 +1218,24 @@ static int usb_suspend_both(struct usb_device *udev, pm_message_t msg)*/ if (udev->parent && !PMSG_IS_AUTO (msg)) status =0 ; + +/* +* If the device is inaccessible, don't try to resume +* suspended interfaces and just return the error. +*/ +if (status && status != -EBUSY ) { +int err; +u16 devstat; + + err =usb_get_status (udev,USB_RECIP_DEVICE ,0 , + &devstat); +if (err) { +dev_err (&udev->dev, +"Failed to suspend device, error %d\n" , + status); + goto done; + } + } }/* If the suspend failed, resume interfaces that did get suspended */
@@ -1631,6 +1649,9 @@ static int autosuspend_check(struct usb_device *udev)int w, i;struct usb_interface *intf; +if (udev->state ==USB_STATE_NOTATTACHED ) +return -ENODEV ; +/* Fail if autosuspend is disabled, or any interfaces are in use, or * any interface drivers require remote wakeup but it isn't available. */
drivers/usb/core/file.c +7 -2
@@ -26,6 +26,7 @@#define MAX_USB_MINORS 256static const struct file_operations *usb_minors[MAX_USB_MINORS ];static DECLARE_RWSEM (minor_rwsem); +static DEFINE_MUTEX (init_usb_class_mutex);static int usb_open (struct inode * inode,struct file * file) {
@@ -116,8 +117,9 @@ static void release_usb_class(struct kref *kref)static void destroy_usb_class (void ) { -if (usb_class) -kref_put (&usb_class->kref, release_usb_class); +mutex_lock (&init_usb_class_mutex); +kref_put (&usb_class->kref, release_usb_class); +mutex_unlock (&init_usb_class_mutex); }int usb_major_init (void )
@@ -179,7 +181,10 @@ int usb_register_dev(struct usb_interface *intf,if (intf->minor >=0 )return -EADDRINUSE ; +mutex_lock (&init_usb_class_mutex); retval =init_usb_class (); +mutex_unlock (&init_usb_class_mutex); +if (retval)return retval;
drivers/usb/core/hub.c +10 -1
@@ -884,6 +884,9 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type) portstatus = portchange =0 ; status =hub_port_status (hub, port1, &portstatus, &portchange); +if (status) + goto abort; +if (udev || (portstatus &USB_PORT_STAT_CONNECTION )) dev_dbg(hub->intfdev, "port %d: status %04x change %04x\n",
@@ -1011,7 +1014,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)/* Scan all ports that need attention */ kick_khubd (hub); - + abort:/* Allow autosuspend if it was suppressed */ if (type <=HUB_INIT3 )usb_autopm_put_interface_async (to_usb_interface (hub->intfdev));
@@ -1778,6 +1781,12 @@ void usb_disconnect(struct usb_device **pdev)dev_info (&udev->dev,"USB disconnect, device number %d\n" , udev->devnum); +/* +* Ensure that the pm runtime code knows that the USB device +* is in the process of being disconnected. +*/ +pm_runtime_barrier (&udev->dev); +usb_lock_device (udev);/* Free up all the children before we remove this device */
drivers/usb/host/xhci-mem.c +1 -1
@@ -2321,7 +2321,7 @@ int xhci_mem_init(struct xhci_hcd *xhci, gfp_t flags) val_64 = (val_64 & (u64 )CMD_RING_RSVD_BITS ) | (xhci->cmd_ring->first_seg->dma & (u64 ) ~CMD_RING_RSVD_BITS ) | xhci->cmd_ring->cycle_state; -xhci_dbg (xhci,"// Setting command ring address to 0x%x\n" , val); +xhci_dbg (xhci,"// Setting command ring address to 0x%016llx\n" , val_64);xhci_write_64 (xhci, val_64, &xhci->op_regs->cmd_ring);xhci_dbg_cmd_ptrs (xhci);
drivers/video/Kconfig +0 -2
@@ -683,8 +683,6 @@ config FB_STI select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT - select STI_CONSOLE - select VT default y ---help--- STI refers to the HP "Standard Text Interface" which is a set of
drivers/video/Makefile +1 -0
@@ -12,6 +12,7 @@ fb-y := fbmem.o fbmon.o fbcmap.o fbsysfs.o \ fb-objs := $(fb-y) obj-$(CONFIG_VT) += console/ +obj-$(CONFIG_FB_STI) += console/ obj-$(CONFIG_LOGO) += logo/ obj-y += backlight/ display/
fs/cifs/cifssmb.c +3 -0
@@ -764,6 +764,9 @@ CIFSSMBEcho(struct TCP_Server_Info *server)if (rc)return rc; +if (server->capabilities &CAP_UNICODE ) + smb->hdr.Flags2 |=SMBFLG2_UNICODE ; +/* set up echo request */ smb->hdr.Tid =0xffff ; smb->hdr.WordCount =1 ;
fs/cifs/netmisc.c +3 -3
@@ -974,10 +974,10 @@ struct timespec cnvrtDosUnixTm(__le16 le_date, __le16 le_time, int offset)cERROR (1 ,"illegal hours %d" , st->Hours); days = sd->Day; month = sd->Month; -if ((days >31 ) || (month >12 )) { +if (days <1 || days >31 || month <1 || month >12 ) {cERROR (1 ,"illegal date, month %d day: %d" , month, days); -if (month >12 ) - month =12 ; + days =clamp (days,1 ,31 ); + month =clamp (month,1 ,12 ); } month -=1 ; days += total_days_of_prev_months[month];
fs/timerfd.c +14 -3
@@ -34,6 +34,7 @@ struct timerfd_ctx {int clockid;struct rcu_head rcu;struct list_head clist; +spinlock_t cancel_lock;bool might_cancel; };
@@ -86,7 +87,7 @@ void timerfd_clock_was_set(void)rcu_read_unlock (); } -static void timerfd_remove_cancel (struct timerfd_ctx *ctx) +static void __timerfd_remove_cancel (struct timerfd_ctx *ctx) {if (ctx->might_cancel) { ctx->might_cancel = false;
@@ -96,6 +97,13 @@ static void timerfd_remove_cancel(struct timerfd_ctx *ctx) } } +static void timerfd_remove_cancel (struct timerfd_ctx *ctx) +{ +spin_lock (&ctx->cancel_lock); +__timerfd_remove_cancel (ctx); +spin_unlock (&ctx->cancel_lock); +} +static bool timerfd_canceled (struct timerfd_ctx *ctx) {if (!ctx->might_cancel || ctx->moffs.tv64 !=KTIME_MAX )
@@ -106,6 +114,7 @@ static bool timerfd_canceled(struct timerfd_ctx *ctx)static void timerfd_setup_cancel (struct timerfd_ctx *ctx,int flags) { +spin_lock (&ctx->cancel_lock);if (ctx->clockid ==CLOCK_REALTIME && (flags &TFD_TIMER_ABSTIME ) && (flags &TFD_TIMER_CANCEL_ON_SET )) {if (!ctx->might_cancel) {
@@ -114,9 +123,10 @@ static void timerfd_setup_cancel(struct timerfd_ctx *ctx, int flags)list_add_rcu (&ctx->clist, &cancel_list);spin_unlock (&cancel_lock); } - }else if (ctx->might_cancel) { -timerfd_remove_cancel (ctx); + }else { +__timerfd_remove_cancel (ctx); } +spin_unlock (&ctx->cancel_lock); }static ktime_t timerfd_get_remaining (struct timerfd_ctx *ctx)
@@ -268,6 +278,7 @@ SYSCALL_DEFINE2(timerfd_create, int, clockid, int, flags)return -ENOMEM ;init_waitqueue_head (&ctx->wqh); +spin_lock_init (&ctx->cancel_lock); ctx->clockid = clockid;hrtimer_init (&ctx->tmr, clockid,HRTIMER_MODE_ABS ); ctx->moffs =ktime_get_monotonic_offset ();
include/linux/netfilter/nf_conntrack_common.h +9 -0
@@ -83,6 +83,15 @@ enum ip_conntrack_status {/* Conntrack is a fake untracked entry */ IPS_UNTRACKED_BIT =12 ,IPS_UNTRACKED = (1 <<IPS_UNTRACKED_BIT ), + +/* Be careful here, modifying these bits can make things messy, +* so don't let users modify them directly. +*/ +IPS_UNCHANGEABLE_MASK = (IPS_NAT_DONE_MASK |IPS_NAT_MASK | +IPS_EXPECTED |IPS_CONFIRMED |IPS_DYING | +IPS_SEQ_ADJUST |IPS_TEMPLATE ), + + __IPS_MAX_BIT = 13, };/* Connection tracking event types */
ipc/mqueue.c +3 -1
@@ -1095,8 +1095,10 @@ SYSCALL_DEFINE2(mq_notify, mqd_t, mqdes, timeo =MAX_SCHEDULE_TIMEOUT ; ret =netlink_attachskb (sock, nc, &timeo,NULL ); -if (ret ==1 ) +if (ret ==1 ) { + sock =NULL ; goto retry; + }if (ret) { sock =NULL ; nc =NULL ;
kernel/padata.c +1 -1
@@ -369,7 +369,7 @@ static int padata_setup_cpumasks(struct parallel_data *pd,cpumask_and (pd->cpumask.pcpu, pcpumask, cpu_active_mask);if (!alloc_cpumask_var (&pd->cpumask.cbcpu,GFP_KERNEL )) { -free_cpumask_var (pd->cpumask.cbcpu); +free_cpumask_var (pd->cpumask.pcpu);return -ENOMEM ; }
net/bluetooth/hci_sock.c +2 -1
@@ -477,7 +477,8 @@ static int hci_sock_sendmsg(struct kiocb *iocb, struct socket *sock,if (msg->msg_flags &MSG_OOB )return -EOPNOTSUPP ; -if (msg->msg_flags & ~(MSG_DONTWAIT |MSG_NOSIGNAL |MSG_ERRQUEUE )) +if (msg->msg_flags & ~(MSG_DONTWAIT |MSG_NOSIGNAL |MSG_ERRQUEUE | +MSG_CMSG_COMPAT ))return -EINVAL ;if (len <4 || len >HCI_MAX_FRAME_SIZE )
net/ipv4/tcp_lp.c +4 -2
@@ -264,13 +264,15 @@ static void tcp_lp_pkts_acked(struct sock *sk, u32 num_acked, s32 rtt_us) {struct tcp_sock *tp =tcp_sk (sk);struct lp *lp =inet_csk_ca (sk); +u32 delta;if (rtt_us >0 )tcp_lp_rtt_sample (sk, rtt_us);/* calc inference */ -if (tcp_time_stamp > tp->rx_opt.rcv_tsecr) - lp->inference =3 * (tcp_time_stamp - tp->rx_opt.rcv_tsecr); + delta = tcp_time_stamp - tp->rx_opt.rcv_tsecr; +if ((s32 )delta >0 ) + lp->inference =3 * delta;/* test if within inference */ if (lp->last_drop && (tcp_time_stamp - lp->last_drop < lp->inference))
net/ipv6/exthdrs.c +1 -1
@@ -723,13 +723,13 @@ void ipv6_push_nfrag_opts(struct sk_buff *skb, struct ipv6_txoptions *opt,ipv6_push_exthdr (skb, proto,NEXTHDR_HOP , opt->hopopt); } -EXPORT_SYMBOL (ipv6_push_nfrag_opts);void ipv6_push_frag_opts (struct sk_buff *skb,struct ipv6_txoptions *opt,u8 *proto) {if (opt->dst1opt)ipv6_push_exthdr (skb, proto,NEXTHDR_DEST , opt->dst1opt); } +EXPORT_SYMBOL (ipv6_push_frag_opts);struct ipv6_txoptions *ipv6_dup_options (struct sock *sk,struct ipv6_txoptions *opt)
net/ipv6/ip6_output.c +6 -2
@@ -561,13 +561,14 @@ static void ip6_copy_metadata(struct sk_buff *to, struct sk_buff *from)int ip6_find_1stfragopt (struct sk_buff *skb,u8 **nexthdr) { -u16 offset =sizeof (struct ipv6hdr ); +unsigned int offset =sizeof (struct ipv6hdr );unsigned int packet_len = skb->tail - skb->network_header;int found_rhdr =0 ; *nexthdr = &ipv6_hdr (skb)->nexthdr;while (offset <= packet_len) {struct ipv6_opt_hdr *exthdr; +unsigned int len;switch (**nexthdr) {
@@ -593,7 +594,10 @@ int ip6_find_1stfragopt(struct sk_buff *skb, u8 **nexthdr) exthdr = (struct ipv6_opt_hdr *)(skb_network_header (skb) + offset); - offset +=ipv6_optlen (exthdr); + len =ipv6_optlen (exthdr); +if (len + offset >=IPV6_MAXPLEN ) +return -EINVAL ; + offset += len; *nexthdr = &exthdr->nexthdr; }
net/ipv6/ip6_tunnel.c +2 -2
@@ -818,7 +818,7 @@ static void init_tel_txopt(struct ipv6_tel_txoption *opt, __u8 encap_limit) opt->dst_opt[5 ] =IPV6_TLV_PADN ; opt->dst_opt[6 ] =1 ; - opt->ops.dst0opt = (struct ipv6_opt_hdr *) opt->dst_opt; + opt->ops.dst1opt = (struct ipv6_opt_hdr *) opt->dst_opt; opt->ops.opt_nflen =8 ; }
@@ -989,7 +989,7 @@ static int ip6_tnl_xmit2(struct sk_buff *skb, proto = fl6->flowi6_proto;if (encap_limit >=0 ) {init_tel_txopt (&opt, encap_limit); -ipv6_push_nfrag_opts (skb, &opt.ops, &proto,NULL ); +ipv6_push_frag_opts (skb, &opt.ops, &proto); }skb_push (skb,sizeof (struct ipv6hdr ));skb_reset_network_header (skb);
net/netfilter/nf_conntrack_netlink.c +21 -6
@@ -1053,6 +1053,24 @@ ctnetlink_parse_nat_setup(struct nf_conn *ct, }#endif +static void +__ctnetlink_change_status (struct nf_conn *ct,unsigned long on, +unsigned long off) +{ +unsigned int bit; + +/* Ignore these unchangable bits */ + on &= ~IPS_UNCHANGEABLE_MASK ; + off &= ~IPS_UNCHANGEABLE_MASK ; + +for (bit =0 ; bit < __IPS_MAX_BIT; bit++) { +if (on & (1 << bit)) +set_bit (bit, &ct->status); +else if (off & (1 << bit)) +clear_bit (bit, &ct->status); + } +} +static int ctnetlink_change_status (struct nf_conn *ct,const struct nlattr *const cda[]) {
@@ -1072,10 +1090,7 @@ ctnetlink_change_status(struct nf_conn *ct, const struct nlattr * const cda[])/* ASSURED bit can only be set */ return -EBUSY ; -/* Be careful here, modifying NAT bits can screw up things, -* so don't let users modify them directly if they don't pass -* nf_nat_range. */ - ct->status |= status & ~(IPS_NAT_DONE_MASK |IPS_NAT_MASK ); +__ctnetlink_change_status (ct, status,0 );return 0 ; }
@@ -1258,7 +1273,7 @@ ctnetlink_change_nat_seq_adj(struct nf_conn *ct,if (ret <0 )return ret; - ct->status |=IPS_SEQ_ADJUST ; +set_bit (IPS_SEQ_ADJUST_BIT , &ct->status); }if (cda[CTA_NAT_SEQ_ADJ_REPLY ]) {
@@ -1267,7 +1282,7 @@ ctnetlink_change_nat_seq_adj(struct nf_conn *ct,if (ret <0 )return ret; - ct->status |=IPS_SEQ_ADJUST ; +set_bit (IPS_SEQ_ADJUST_BIT , &ct->status); }return 0 ;
net/packet/af_packet.c +9 -4
@@ -3132,14 +3132,19 @@ packet_setsockopt(struct socket *sock, int level, int optname, char __user *optvif (optlen !=sizeof (val))return -EINVAL ; -if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) -return -EBUSY ;if (copy_from_user (&val, optval,sizeof (val)))return -EFAULT ;if (val >INT_MAX )return -EINVAL ; - po->tp_reserve = val; -return 0 ; +lock_sock (sk); +if (po->rx_ring.pg_vec || po->tx_ring.pg_vec) { + ret = -EBUSY ; + }else { + po->tp_reserve = val; + ret =0 ; + } +release_sock (sk); +return ret; }case PACKET_LOSS : {