Linux 2.6.33.17
Subsystems (40)
I'm announcing the release of the 2.6.33.17 kernel.
This is primarily for the use of those people who are stuck using the .33-rt kernel. Anyone else who really wants to use the .33 kernel tree is welcome to use this one as well.
Note, as the -rt tree should soon be "stable" and based off of the 3.0 kernel release, it is unknown how much longer I will be maintaining this branch. You have been forwarned.
The updated 2.6.33.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/longterm/linux-2.6.33.y.git
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/longterm/linux-2.6.33.y.git;a=summarythanks,
greg k-h
------------
Makefile | 2 - arch/alpha/kernel/osf_sys.c | 11 +++--- arch/arm/mach-davinci/board-dm365-evm.c | 4 +- arch/arm/mach-pxa/cm-x300.c | 8 ++-- arch/powerpc/kernel/crash.c | 6 --- arch/powerpc/platforms/pseries/hvconsole.c | 2 - arch/x86/kernel/hpet.c | 53 +++++++++++++++-------------- arch/x86/kernel/reboot.c | 8 ++++ arch/x86/kernel/relocate_kernel_32.S | 2 + arch/x86/kernel/relocate_kernel_64.S | 2 + arch/xtensa/kernel/ptrace.c | 3 + drivers/ata/libata-eh.c | 12 ++++-- drivers/block/cciss.h | 2 - drivers/hwmon/asus_atk0110.c | 1 drivers/hwmon/max1111.c | 11 ++++++ drivers/md/dm-mpath.c | 5 ++ drivers/md/dm.c | 10 ++++- drivers/media/radio/si4713-i2c.c | 4 +- drivers/media/video/bt8xx/bttv-driver.c | 2 - drivers/media/video/pvrusb2/pvrusb2-hdw.c | 4 ++ drivers/media/video/v4l2-ioctl.c | 6 +++ drivers/misc/Kconfig | 3 - drivers/net/jme.c | 20 +++++++--- drivers/pci/pci.c | 7 +++ drivers/scsi/libsas/sas_expander.c | 3 + drivers/scsi/pmcraid.c | 3 + drivers/scsi/scsi_devinfo.c | 2 + drivers/scsi/ses.c | 6 ++- drivers/staging/comedi/comedi_fops.c | 4 +- drivers/usb/gadget/dummy_hcd.c | 1 drivers/usb/host/ehci-hub.c | 3 + drivers/usb/host/ehci-q.c | 3 + drivers/usb/host/ehci.h | 1 drivers/usb/musb/musb_core.c | 1 drivers/usb/serial/pl2303.c | 2 + drivers/usb/serial/pl2303.h | 10 ++++- fs/block_dev.c | 27 ++++---------- fs/ext3/xattr.c | 12 +++++- fs/proc/base.c | 7 ++- include/drm/i915_drm.h | 2 - include/linux/netdevice.h | 5 ++ net/bridge/br_private.h | 1 net/bridge/br_stp.c | 4 +- net/ipv4/ip_gre.c | 19 +++++----- net/ipv6/xfrm6_tunnel.c | 16 ++++++-- net/mac80211/mlme.c | 3 + net/sunrpc/rpcb_clnt.c | 2 - net/sunrpc/sched.c | 27 ++++++-------- net/sunrpc/svc_xprt.c | 11 +++--- sound/core/pcm_compat.c | 2 - sound/soc/blackfin/bf5xx-i2s-pcm.c | 13 ++++++- 51 files changed, 247 insertions(+), 131 deletions(-)
Ajay Kumar Gupta (1):
usb: musb: restore INDEX register in resume path
Alan Stern (2):
USB: dummy-hcd needs the has_tt flag
EHCI: fix direction handling for interrupt data toggles
Alasdair G Kergon (1):
dm: fix idr leak on module removal
Alexey Dobriyan (2):
gre: fix netns vs proto registration ordering netns xfrm: fixup xfrm6_tunnel error propagation
Anton Blanchard (1):
powerpc/pseries/hvconsole: Fix dropped console output
Ben Greear (1):
SUNRPC: Fix use of static variable in rpcb_getport_async
Chris Wright (1):
PCI: ARI is a PCIe v2 feature
Dan Rosenberg (3):
pmcraid: reject negative request size
xtensa: prevent arbitrary read in ptrace
alpha: fix several security issues
Daniel J Blueman (1):
x86: Make Dell Latitude E5420 use reboot=pci
Douglas Gilbert (1):
ses: requesting a fault indication
Greg Kroah-Hartman (3):
USB: pl2303.h: checkpatch cleanups
Revert "block: rescan partitions on invalidated devices on -ENOMEDIA too" Linux 2.6.33.17
Guo-Fu Tseng (1):
jme: Fix unmap error (Causing system freeze)
Hans Verkuil (3):
v4l2-ioctl.c: prefill tuner type for g_frequency and g/s_tuner
pvrusb2: fix g/s_tuner support
bttv: fix s_tuner for radio
Herbert Xu (1):
gro: Only reset frag0 when skb can be pulled
Huang Ying (1):
kexec, x86: Fix incorrect jump back address if not preserving context
Igor Grinberg (1):
ARM: pxa/cm-x300: fix V3020 RTC functionality
J. Bruce Fields (1):
svcrpc: fix list-corrupting race on nfsd shutdown
Jan Kara (1):
ext3: Fix oops in ext3_try_to_allocate_with_rsv()
Jon Povey (1):
davinci: DM365 EVM: fix video input mux bits
Julia Lawall (1):
ALSA: sound/core/pcm_compat.c: adjust array index
Luben Tuikov (1):
libsas: remove expander from dev list on error
Luca Tettamanti (1):
hwmon: (asus_atk0110) Fix memory leak
Manuel Jander (1):
USB: pl2303: add AdLink ND-6530 USB IDs
Mark Brown (1):
ASoC: Fix Blackfin I2S _pointer() implementation return in bounds values
Mauro Carvalho Chehab (1):
si4713-i2c: avoid potential buffer overflow on si4713
Michael Neuling (1):
powerpc/kdump: Fix timeout in crash_kexec_wait_realmode
Mike Snitzer (1):
dm mpath: fix potential NULL pointer in feature arg processing
Ole Henrik Jahren (1):
drm/i915: Fix typo in DRM_I915_OVERLAY_PUT_IMAGE ioctl define
Pavel Herrmann (1):
hwmon: (max1111) Fix race condition causing NULL pointer exception
Philip A. Prindeville (1):
geode: reflect mfgpt dependency on mfd
Rajkumar Manoharan (1):
mac80211: Restart STA timers only on associated state
Sergei Shtylyov (1):
EHCI: only power off port if over-current is active
Stephen M. Cameron (1):
cciss: do not attempt to read from a write-only register
Tejun Heo (1):
libata: fix unexpectedly frozen port after ata_eh_reset()
Thomas Gleixner (2):
x86: Hpet: Avoid the comparator readback penalty
x86: HPET: Chose a paranoid safe value for the ETIME check
Trond Myklebust (1):
SUNRPC: Fix a race between work-queue and rpc_killall_tasks
Vasiliy Kulikov (2):
staging: comedi: fix infoleak to userspace
proc: restrict access to /proc/PID/io
Werner Fink (1):
Blacklist Traxdata CDR4120 and IOMEGA Zip drive to avoid lock ups.
Wolfgang Denk (1):
USB: serial: add IDs for WinChipHead USB->RS232 adapter
stephen hemminger (1):
bridge: send proper message_age in config BPDU
Makefile +1 -1
@@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 33 -EXTRAVERSION = .16 +EXTRAVERSION = .17 NAME = Man-Eating Seals of Antiquity # *DOCUMENTATION*
arch/alpha/kernel/osf_sys.c +7 -4
@@ -431,7 +431,7 @@ SYSCALL_DEFINE2(osf_getdomainname, char __user *, name, int, namelen)return -EFAULT ; len = namelen; -if (namelen >32 ) +if (len >32 ) len =32 ;down_read (&uts_sem);
@@ -618,7 +618,7 @@ SYSCALL_DEFINE3(osf_sysinfo, int, command, char __user *, buf, long, count)down_read (&uts_sem); res = sysinfo_table[offset]; len =strlen (res)+1 ; -if (len > count) +if ((unsigned long )len > (unsigned long )count) len = count;if (copy_to_user (buf, res, len)) err = -EFAULT ;
@@ -673,7 +673,7 @@ SYSCALL_DEFINE5(osf_getsysinfo, unsigned long, op, void __user *, buffer,return 1 ;case GSI_GET_HWRPB : -if (nbytes <sizeof (*hwrpb)) +if (nbytes >sizeof (*hwrpb))return -EINVAL ;if (copy_to_user (buffer, hwrpb, nbytes) !=0 )return -EFAULT ;
@@ -1035,6 +1035,7 @@ SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options, {struct rusage r;long ret, err; +unsigned int status =0 ;mm_segment_t old_fs;if (!ur)
@@ -1043,13 +1044,15 @@ SYSCALL_DEFINE4(osf_wait4, pid_t, pid, int __user *, ustatus, int, options, old_fs =get_fs ();set_fs (KERNEL_DS ); - ret =sys_wait4 (pid, ustatus, options, (struct rusage __user *) &r); + ret =sys_wait4 (pid, (unsigned int __user *) &status, options, + (struct rusage __user *) &r);set_fs (old_fs);if (!access_ok (VERIFY_WRITE , ur,sizeof (*ur)))return -EFAULT ; err =0 ; + err |=put_user (status, ustatus); err |=__put_user (r.ru_utime.tv_sec, &ur->ru_utime.tv_sec); err |=__put_user (r.ru_utime.tv_usec, &ur->ru_utime.tv_usec); err |=__put_user (r.ru_stime.tv_sec, &ur->ru_stime.tv_sec);
arch/arm/mach-davinci/board-dm365-evm.c +2 -2
@@ -453,7 +453,7 @@ fail:*/ if (have_imager ()) { label ="HD imager" ; - mux |=1 ; + mux |=2 ;/* externally mux MMC1/ENET/AIC33 to imager */ mux |=BIT (6 ) |BIT (5 ) |BIT (3 );
@@ -474,7 +474,7 @@ fail: resets &= ~BIT (1 );if (have_tvp7002 ()) { - mux |=2 ; + mux |=1 ; resets &= ~BIT (2 ); label ="tvp7002 HD" ; }else {
arch/arm/mach-pxa/cm-x300.c +4 -4
@@ -154,10 +154,10 @@ static mfp_cfg_t cm_x3xx_mfp_cfg[] __initdata = {GPIO99_GPIO ,/* Ethernet IRQ */ /* RTC GPIOs */ -GPIO95_GPIO ,/* RTC CS */ -GPIO96_GPIO ,/* RTC WR */ -GPIO97_GPIO ,/* RTC RD */ -GPIO98_GPIO ,/* RTC IO */ +GPIO95_GPIO |MFP_LPM_DRIVE_HIGH ,/* RTC CS */ +GPIO96_GPIO |MFP_LPM_DRIVE_HIGH ,/* RTC WR */ +GPIO97_GPIO |MFP_LPM_DRIVE_HIGH ,/* RTC RD */ +GPIO98_GPIO ,/* RTC IO */ /* Standard I2C */ GPIO21_I2C_SCL,
arch/powerpc/kernel/crash.c +1 -5
@@ -176,12 +176,8 @@ static void crash_kexec_wait_realmode(int cpu)while (paca[i].kexec_state <KEXEC_STATE_REAL_MODE ) {barrier (); -if (!cpu_possible (i)) { +if (!cpu_possible (i) || !cpu_online (i) || (msecs <=0 ))break ; - } -if (!cpu_online (i)) { -break ; - } msecs--;mdelay (1 ); }
arch/powerpc/platforms/pseries/hvconsole.c +1 -1
@@ -73,7 +73,7 @@ int hvc_put_chars(uint32_t vtermno, const char *buf, int count)if (ret ==H_SUCCESS )return count;if (ret ==H_BUSY ) -return 0 ; +return -EAGAIN ;return -EIO ; }
arch/x86/kernel/hpet.c +29 -24
79 lines not on this page · raw message
arch/x86/kernel/reboot.c +8 -0
@@ -469,6 +469,14 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "iMac9,1"), }, }, + { /* Handle problems with rebooting on the Latitude E5420. */ + .callback = set_pci_reboot, + .ident = "Dell Latitude E5420", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Latitude E5420"), + }, + }, { } };
arch/x86/kernel/relocate_kernel_32.S +2 -0
@@ -97,6 +97,8 @@ relocate_kernel: ret identity_mapped: + /* set return address to 0 if not preserving context */ + pushl $0 /* store the start address on the stack */ pushl %edx
arch/x86/kernel/relocate_kernel_64.S +2 -0
@@ -100,6 +100,8 @@ relocate_kernel: ret identity_mapped: + /* set return address to 0 if not preserving context */ + pushq $0 /* store the start address on the stack */ pushq %rdx
arch/xtensa/kernel/ptrace.c +3 -0
@@ -136,6 +136,9 @@ int ptrace_setxregs(struct task_struct *child, void __user *uregs)elf_xtregs_t *xtregs = uregs;int ret =0 ; +if (!access_ok (VERIFY_READ , uregs,sizeof (elf_xtregs_t))) +return -EFAULT ; +#if XTENSA_HAVE_COPROCESSORS /* Flush all coprocessors before we overwrite them. */ coprocessor_flush_all (ti);
drivers/ata/libata-eh.c +8 -4
@@ -2716,10 +2716,11 @@ int ata_eh_reset(struct ata_link *link, int classify, }/* -* Some controllers can't be frozen very well and may set -* spuruious error conditions during reset. Clear accumulated -* error information. As reset is the final recovery action, -* nothing is lost by doing this. +* Some controllers can't be frozen very well and may set spurious +* error conditions during reset. Clear accumulated error +* information and re-thaw the port if frozen. As reset is the +* final recovery action and we cross check link onlineness against +* device classification later, no hotplug event is lost by this. */ spin_lock_irqsave (link->ap->lock, flags);memset (&link->eh_info,0 ,sizeof (link->eh_info));
@@ -2728,6 +2729,9 @@ int ata_eh_reset(struct ata_link *link, int classify, ap->pflags &= ~ATA_PFLAG_EH_PENDING ;spin_unlock_irqrestore (link->ap->lock, flags); +if (ap->pflags &ATA_PFLAG_FROZEN ) +ata_eh_thaw_port (ap); +/* * Make sure onlineness and classification result correspond. * Hotplug could have happened during reset and some
drivers/block/cciss.h +1 -1
@@ -181,7 +181,7 @@ static void SA5_submit_command( ctlr_info_t *h, CommandList_struct *c)printk ("Sending %x - down to controller\n" , c->busaddr );#endif /* CCISS_DEBUG */ writel (c->busaddr, h->vaddr +SA5_REQUEST_PORT_OFFSET ); -readl (h->vaddr +SA5_REQUEST_PORT_OFFSET ); +readl (h->vaddr +SA5_SCRATCHPAD_OFFSET ); h->commands_outstanding++;if ( h->commands_outstanding > h->max_outstanding) h->max_outstanding = h->commands_outstanding;
drivers/hwmon/asus_atk0110.c +1 -0
@@ -654,6 +654,7 @@ static int atk_debugfs_gitm_get(void *p, u64 *val)else err = -EIO ; +ACPI_FREE (ret);return err; }
drivers/hwmon/max1111.c +11 -0
@@ -39,6 +39,8 @@ struct max1111_data {struct spi_transfer xfer[2 ];uint8_t *tx_buf;uint8_t *rx_buf; +struct mutex drvdata_lock; +/* protect msg, xfer and buffers from multiple access */ };static int max1111_read (struct device *dev,int channel)
@@ -47,6 +49,9 @@ static int max1111_read(struct device *dev, int channel)uint8_t v1, v2;int err; +/* writing to drvdata struct is not thread safe, wait on mutex */ +mutex_lock (&data->drvdata_lock); + data->tx_buf[0 ] = (channel <<MAX1111_CTRL_SEL_SH ) |MAX1111_CTRL_PD0 |MAX1111_CTRL_PD1 |MAX1111_CTRL_SGL |MAX1111_CTRL_UNI |MAX1111_CTRL_STR ;
@@ -54,12 +59,15 @@ static int max1111_read(struct device *dev, int channel) err =spi_sync (data->spi, &data->msg);if (err <0 ) {dev_err (dev,"spi_sync failed with %d\n" , err); +mutex_unlock (&data->drvdata_lock);return err; } v1 = data->rx_buf[0 ]; v2 = data->rx_buf[1 ]; +mutex_unlock (&data->drvdata_lock); +if ((v1 &0xc0 ) || (v2 &0x3f ))return -EINVAL ;
@@ -175,6 +183,8 @@ static int __devinit max1111_probe(struct spi_device *spi)if (err) goto err_free_data; +mutex_init (&data->drvdata_lock); + data->spi = spi;spi_set_drvdata (spi, data);
@@ -212,6 +222,7 @@ static int __devexit max1111_remove(struct spi_device *spi)hwmon_device_unregister (data->hwmon_dev);sysfs_remove_group (&spi->dev.kobj, &max1111_attr_group); +mutex_destroy (&data->drvdata_lock);kfree (data->rx_buf);kfree (data->tx_buf);kfree (data);
drivers/md/dm-mpath.c +5 -0
@@ -782,6 +782,11 @@ static int parse_features(struct arg_set *as, struct multipath *m)if (!argc)return 0 ; +if (argc > as->argc) { + ti->error ="not enough arguments for features" ; +return -EINVAL ; + } + do { param_name = shift(as); argc--;
drivers/md/dm.c +8 -2
@@ -36,6 +36,8 @@ static const char *_name = DM_NAME;static unsigned int major =0 ;static unsigned int _major =0 ; +static DEFINE_IDR (_minor_idr); +static DEFINE_SPINLOCK (_minor_lock);/* * For bio-based dm.
@@ -324,6 +326,12 @@ static void __exit dm_exit(void)while (i--) _exits[i](); + +/* +* Should be empty by this point. +*/ +idr_remove_all (&_minor_idr); +idr_destroy (&_minor_idr); }/*
@@ -1772,8 +1780,6 @@ static int dm_any_congested(void *congested_data, int bdi_bits)/*----------------------------------------------------------------- * An IDR is used to keep track of allocated minor numbers. *---------------------------------------------------------------*/ -static DEFINE_IDR (_minor_idr); -static void free_minor (int minor) {spin_lock (&_minor_lock);
drivers/media/radio/si4713-i2c.c +2 -2
@@ -1003,7 +1003,7 @@ static int si4713_write_econtrol_string(struct si4713_device *sdev,char ps_name[MAX_RDS_PS_NAME +1 ]; len = control->size -1 ; -if (len >MAX_RDS_PS_NAME ) { +if (len <0 || len >MAX_RDS_PS_NAME ) { rval = -ERANGE ; goto exit; }
@@ -1025,7 +1025,7 @@ static int si4713_write_econtrol_string(struct si4713_device *sdev,char radio_text[MAX_RDS_RADIO_TEXT +1 ]; len = control->size -1 ; -if (len >MAX_RDS_RADIO_TEXT ) { +if (len <0 || len >MAX_RDS_RADIO_TEXT ) { rval = -ERANGE ; goto exit; }
drivers/media/video/bt8xx/bttv-driver.c +1 -1
@@ -3526,7 +3526,7 @@ static int radio_s_tuner(struct file *file, void *priv,if (0 != t->index)return -EINVAL ; -bttv_call_all (btv, tuner, g_tuner, t); +bttv_call_all (btv, tuner, s_tuner, t);return 0 ; }
drivers/media/video/pvrusb2/pvrusb2-hdw.c +4 -0
@@ -3015,6 +3015,8 @@ static void pvr2_subdev_update(struct pvr2_hdw *hdw)if (hdw->input_dirty || hdw->audiomode_dirty || hdw->force_dirty) {struct v4l2_tuner vt;memset (&vt,0 ,sizeof (vt)); + vt.type = (hdw->input_val ==PVR2_CVAL_INPUT_RADIO ) ? +V4L2_TUNER_RADIO :V4L2_TUNER_ANALOG_TV ; vt.audmode = hdw->audiomode_val;v4l2_device_call_all (&hdw->v4l2_dev,0 , tuner, s_tuner, &vt); }
@@ -5101,6 +5103,8 @@ void pvr2_hdw_status_poll(struct pvr2_hdw *hdw) {struct v4l2_tuner *vtp = &hdw->tuner_signal_info;memset (vtp,0 ,sizeof (*vtp)); + vtp->type = (hdw->input_val ==PVR2_CVAL_INPUT_RADIO ) ? +V4L2_TUNER_RADIO :V4L2_TUNER_ANALOG_TV ; hdw->tuner_signal_stale =0 ;/* Note: There apparently is no replacement for VIDIOC_CROPCAP using v4l2-subdev - therefore we can't support that AT ALL right
drivers/media/video/v4l2-ioctl.c +6 -0
@@ -1632,6 +1632,8 @@ static long __video_do_ioctl(struct file *file,if (!ops->vidioc_g_tuner)break ; + p->type = (vfd->vfl_type ==VFL_TYPE_RADIO ) ? +V4L2_TUNER_RADIO :V4L2_TUNER_ANALOG_TV ; ret = ops->vidioc_g_tuner (file, fh, p);if (!ret) dbgarg(cmd, "index=%d, name=%s, type=%d, "
@@ -1650,6 +1652,8 @@ static long __video_do_ioctl(struct file *file,if (!ops->vidioc_s_tuner)break ; + p->type = (vfd->vfl_type ==VFL_TYPE_RADIO ) ? +V4L2_TUNER_RADIO :V4L2_TUNER_ANALOG_TV ;dbgarg (cmd,"index=%d, name=%s, type=%d, " "capability=0x%x, rangelow=%d, " "rangehigh=%d, signal=%d, afc=%d, "
@@ -1668,6 +1672,8 @@ static long __video_do_ioctl(struct file *file,if (!ops->vidioc_g_frequency)break ; + p->type = (vfd->vfl_type ==VFL_TYPE_RADIO ) ? +V4L2_TUNER_RADIO :V4L2_TUNER_ANALOG_TV ; ret = ops->vidioc_g_frequency (file, fh, p);if (!ret) dbgarg(cmd, "tuner=%d, type=%d, frequency=%d\n",
drivers/misc/Kconfig +1 -2
@@ -189,8 +189,7 @@ config SGI_XP config CS5535_MFGPT tristate "CS5535/CS5536 Geode Multi-Function General Purpose Timer (MFGPT) support" - depends on PCI - depends on X86 + depends on PCI && X86 && MFD_CS5535 default n help This driver provides access to MFGPT functionality for other
drivers/net/jme.c +14 -6
@@ -681,20 +681,28 @@ jme_make_new_rx_buf(struct jme_adapter *jme, int i)struct jme_ring *rxring = &(jme->rxring[0 ]);struct jme_buffer_info *rxbi = rxring->bufinf + i;struct sk_buff *skb; +dma_addr_t mapping; skb =netdev_alloc_skb (jme->dev, jme->dev->mtu +RX_EXTRA_LEN );if (unlikely (!skb))return -ENOMEM ; + mapping =pci_map_page (jme->pdev,virt_to_page (skb->data), +offset_in_page (skb->data),skb_tailroom (skb), +PCI_DMA_FROMDEVICE ); +if (unlikely (pci_dma_mapping_error (jme->pdev, mapping))) { +dev_kfree_skb (skb); +return -ENOMEM ; + } + +if (likely (rxbi->mapping)) +pci_unmap_page (jme->pdev, rxbi->mapping, + rxbi->len,PCI_DMA_FROMDEVICE ); + rxbi->skb = skb; rxbi->len =skb_tailroom (skb); - rxbi->mapping =pci_map_page (jme->pdev, -virt_to_page (skb->data), -offset_in_page (skb->data), - rxbi->len, -PCI_DMA_FROMDEVICE ); - + rxbi->mapping = mapping;return 0 ; }
drivers/pci/pci.c +6 -1
@@ -1528,7 +1528,7 @@ void pci_enable_ari(struct pci_dev *dev) {int pos;u32 cap; -u16 ctrl; +u16 flags, ctrl;struct pci_dev *bridge;if (!pci_is_pcie (dev) || dev->devfn)
@@ -1546,6 +1546,11 @@ void pci_enable_ari(struct pci_dev *dev)if (!pos)return ; +/* ARI is a PCIe v2 feature */ +pci_read_config_word (bridge, pos +PCI_EXP_FLAGS , &flags); +if ((flags &PCI_EXP_FLAGS_VERS ) <2 ) +return ; +pci_read_config_dword (bridge, pos +PCI_EXP_DEVCAP2 , &cap);if (!(cap &PCI_EXP_DEVCAP2_ARI ))return ;
drivers/scsi/libsas/sas_expander.c +3 -0
@@ -840,6 +840,9 @@ static struct domain_device *sas_ex_discover_expander( res =sas_discover_expander (child);if (res) { +spin_lock_irq (&parent->port->dev_list_lock); +list_del (&child->dev_list_node); +spin_unlock_irq (&parent->port->dev_list_lock);kfree (child);return NULL ; }
drivers/scsi/pmcraid.c +3 -0
@@ -3576,6 +3576,9 @@ static long pmcraid_ioctl_passthrough(pmcraid_err ("couldn't build passthrough ioadls\n" ); goto out_free_buffer; } + }else if (request_size <0 ) { + rc = -EINVAL ; + goto out_free_buffer; }/* If data is being written into the device, copy the data from user
drivers/scsi/scsi_devinfo.c +2 -0
@@ -196,6 +196,7 @@ static struct { {"IBM", "ProFibre 4000R", "*", BLIST_SPARSELUN | BLIST_LARGELUN}, {"IBM", "2105", NULL, BLIST_RETRY_HWERROR}, {"iomega", "jaz 1GB", "J.86", BLIST_NOTQ | BLIST_NOLUN}, + {"IOMEGA", "ZIP", NULL, BLIST_NOTQ | BLIST_NOLUN}, {"IOMEGA", "Io20S *F", NULL, BLIST_KEY}, {"INSITE", "Floptical F*8I", NULL, BLIST_KEY}, {"INSITE", "I325VM", NULL, BLIST_KEY},
@@ -242,6 +243,7 @@ static struct { {"Tornado-", "F4", "*", BLIST_NOREPORTLUN}, {"TOSHIBA", "CDROM", NULL, BLIST_ISROM}, {"TOSHIBA", "CD-ROM", NULL, BLIST_ISROM}, + {"Traxdata", "CDR4120", NULL, BLIST_NOLUN}, /* locks up */ {"USB2.0", "SMARTMEDIA/XD", NULL, BLIST_FORCELUN | BLIST_INQUIRY_36}, {"WangDAT", "Model 2600", "01.7", BLIST_SELECT_NO_ATN}, {"WangDAT", "Model 3200", "02.2", BLIST_SELECT_NO_ATN},
drivers/scsi/ses.c +5 -1
@@ -157,6 +157,10 @@ static unsigned char *ses_get_page2_descriptor(struct enclosure_device *edev,return NULL ; } +/* For device slot and array device slot elements, byte 3 bit 6 +* is "fault sensed" while byte 3 bit 5 is "fault reqstd". As this +* code stands these bits are shifted 4 positions right so in +* sysfs they will appear as bits 2 and 1 respectively. Strange. */ static void ses_get_fault (struct enclosure_device *edev,struct enclosure_component *ecomp) {
@@ -178,7 +182,7 @@ static int ses_set_fault(struct enclosure_device *edev,/* zero is disabled */ break ;case ENCLOSURE_SETTING_ENABLED : - desc[2 ] =0x02 ; + desc[3 ] =0x20 ;break ;default :/* SES doesn't do the SGPIO blink settings */
drivers/staging/comedi/comedi_fops.c +2 -2
@@ -362,8 +362,8 @@ static int do_devinfo_ioctl(struct comedi_device *dev,/* fill devinfo structure */ devinfo.version_code =COMEDI_VERSION_CODE ; devinfo.n_subdevs = dev->n_subdevices; -memcpy (devinfo.driver_name, dev->driver->driver_name,COMEDI_NAMELEN ); -memcpy (devinfo.board_name, dev->board_name,COMEDI_NAMELEN ); +strlcpy (devinfo.driver_name, dev->driver->driver_name,COMEDI_NAMELEN ); +strlcpy (devinfo.board_name, dev->board_name,COMEDI_NAMELEN );if (read_subdev) devinfo.read_subdevice = read_subdev - dev->subdevices;
drivers/usb/gadget/dummy_hcd.c +1 -0
@@ -1886,6 +1886,7 @@ static int dummy_hcd_probe(struct platform_device *pdev)if (!hcd)return -ENOMEM ; the_controller =hcd_to_dummy (hcd); + hcd->has_tt =1 ; retval =usb_add_hcd (hcd,0 ,0 );if (retval !=0 ) {
drivers/usb/host/ehci-hub.c +2 -1
@@ -760,10 +760,11 @@ static int ehci_hub_control (* power switching; they're allowed to just limit the * current. khubd will turn the power back on. */ -if (HCS_PPC (ehci->hcs_params)){ +if ((temp &PORT_OC ) &&HCS_PPC (ehci->hcs_params)) {ehci_writel (ehci, temp & ~(PORT_RWC_BITS |PORT_POWER ), status_reg); + temp =ehci_readl (ehci, status_reg); } }
drivers/usb/host/ehci-q.c +2 -1
@@ -103,7 +103,7 @@ qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd)if (!(hw->hw_info1 &cpu_to_hc32 (ehci,1 <<14 ))) {unsigned is_out, epnum; - is_out = !(qtd->hw_token &cpu_to_hc32 (ehci,1 <<8 )); + is_out = qh->is_out; epnum = (hc32_to_cpup (ehci, &hw->hw_info1) >>8 ) &0x0f ;if (unlikely (!usb_gettoggle (qh->dev, epnum, is_out))) { hw->hw_token &= ~cpu_to_hc32 (ehci,QTD_TOGGLE );
@@ -945,6 +945,7 @@ done: hw = qh->hw; hw->hw_info1 =cpu_to_hc32 (ehci, info1); hw->hw_info2 =cpu_to_hc32 (ehci, info2); + qh->is_out = !is_input;usb_settoggle (urb->dev,usb_pipeendpoint (urb->pipe), !is_input,1 );qh_refresh (ehci, qh);return qh;
drivers/usb/host/ehci.h +1 -0
@@ -365,6 +365,7 @@ struct ehci_qh {#define NO_FRAME ((unsigned short)~0)/* pick new start */ struct usb_device *dev;/* access to TT */ + unsigned is_out:1; /* bulk or intr OUT */ unsigned clearing_tt:1; /* Clear-TT-Buf in progress */ };
drivers/usb/musb/musb_core.c +1 -0
@@ -1640,6 +1640,7 @@ void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit) } } } +musb_writeb (musb_base,MUSB_INDEX , musb->context.index); }#else
drivers/usb/serial/pl2303.c +2 -0
@@ -99,6 +99,8 @@ static struct usb_device_id id_table [] = { { USB_DEVICE(CRESSI_VENDOR_ID, CRESSI_EDY_PRODUCT_ID) }, { USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) }, { USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) }, + { USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) }, + { USB_DEVICE(WINCHIPHEAD_VENDOR_ID, WINCHIPHEAD_USBSER_PRODUCT_ID) }, { } /* Terminating entry */ };
drivers/usb/serial/pl2303.h +9 -1
@@ -5,7 +5,7 @@* it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. -* +* */ #define BENQ_VENDOR_ID 0x04a5
@@ -136,3 +136,11 @@/* Sanwa KB-USB2 multimeter cable (ID: 11ad:0001) */ #define SANWA_VENDOR_ID 0x11ad#define SANWA_PRODUCT_ID 0x0001 + +/* ADLINK ND-6530 RS232,RS485 and RS422 adapter */ +#define ADLINK_VENDOR_ID 0x0b63 +#define ADLINK_ND6530_PRODUCT_ID 0x6530 + +/* WinChipHead USB->RS 232 adapter */ +#define WINCHIPHEAD_VENDOR_ID 0x4348 +#define WINCHIPHEAD_USBSER_PRODUCT_ID 0x5523
fs/block_dev.c +9 -18
@@ -1211,7 +1211,6 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)if (!bdev->bd_part) goto out_clear; - ret =0 ;if (disk->fops->open) { ret = disk->fops->open (bdev, mode);if (ret == -ERESTARTSYS ) {
@@ -1227,18 +1226,9 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)mutex_unlock (&bdev->bd_mutex); goto restart; } +if (ret) + goto out_clear; } -/* -* If the device is invalidated, rescan partition -* if open succeeded or failed with -ENOMEDIUM. -* The latter is necessary to prevent ghost -* partitions on a removed medium. -*/ -if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM )) -rescan_partitions (disk, bdev); -if (ret) - goto out_clear; -if (!bdev->bd_openers) {bd_set_size (bdev,(loff_t )get_capacity (disk)<<9 ); bdi =blk_get_backing_dev_info (bdev);
@@ -1246,6 +1236,8 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part) bdi = &default_backing_dev_info; bdev->bd_inode->i_data.backing_dev_info = bdi; } +if (bdev->bd_invalidated) +rescan_partitions (disk, bdev); }else {struct block_device *whole; whole =bdget_disk (disk,0 );
@@ -1272,14 +1264,13 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)put_disk (disk); disk =NULL ;if (bdev->bd_contains == bdev) { - ret =0 ; -if (bdev->bd_disk->fops->open) +if (bdev->bd_disk->fops->open) { ret = bdev->bd_disk->fops->open (bdev, mode); -/* the same as first opener case, read comment there */ -if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM )) +if (ret) + goto out_unlock_bdev; + } +if (bdev->bd_invalidated)rescan_partitions (bdev->bd_disk, bdev); -if (ret) - goto out_unlock_bdev; } } bdev->bd_openers++;
fs/ext3/xattr.c +10 -2
@@ -803,8 +803,16 @@ inserted:/* We need to allocate a new block */ ext3_fsblk_t goal =ext3_group_first_block_no (sb,EXT3_I (inode)->i_block_group); -ext3_fsblk_t block =ext3_new_block (handle, inode, - goal, &error); +ext3_fsblk_t block; + +/* +* Protect us agaist concurrent allocations to the +* same inode from ext3_..._writepage(). Reservation +* code does not expect racing allocations. +*/ +mutex_lock (&EXT3_I (inode)->truncate_mutex); + block =ext3_new_block (handle, inode, goal, &error); +mutex_unlock (&EXT3_I (inode)->truncate_mutex);if (error) goto cleanup;ea_idebug (inode,"creating block %d" , block);
fs/proc/base.c +5 -2
@@ -2519,6 +2519,9 @@ static int do_io_accounting(struct task_struct *task, char *buffer, int whole)struct task_io_accounting acct = task->ioac;unsigned long flags; +if (!ptrace_may_access (task,PTRACE_MODE_READ )) +return -EACCES ; +if (whole &&lock_task_sighand (task, &flags)) {struct task_struct *t = task;
@@ -2641,7 +2644,7 @@ static const struct pid_entry tgid_base_stuff[] = { REG("coredump_filter", S_IRUGO|S_IWUSR, proc_coredump_filter_operations),#endif #ifdef CONFIG_TASK_IO_ACCOUNTING - INF("io", S_IRUGO, proc_tgid_io_accounting), + INF("io", S_IRUSR, proc_tgid_io_accounting),#endif };
@@ -2977,7 +2980,7 @@ static const struct pid_entry tid_base_stuff[] = { REG("make-it-fail", S_IRUGO|S_IWUSR, proc_fault_inject_operations),#endif #ifdef CONFIG_TASK_IO_ACCOUNTING - INF("io", S_IRUGO, proc_tid_io_accounting), + INF("io", S_IRUSR, proc_tid_io_accounting),#endif };
include/drm/i915_drm.h +1 -1
@@ -227,7 +227,7 @@ typedef struct _drm_i915_sarea {#define DRM_IOCTL_I915_GEM_GET_APERTURE DRM_IOR (DRM_COMMAND_BASE + DRM_I915_GEM_GET_APERTURE, struct drm_i915_gem_get_aperture)#define DRM_IOCTL_I915_GET_PIPE_FROM_CRTC_ID DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GET_PIPE_FROM_CRTC_ID, struct drm_i915_get_pipe_from_crtc_id)#define DRM_IOCTL_I915_GEM_MADVISE DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_MADVISE, struct drm_i915_gem_madvise) -#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_IOCTL_I915_OVERLAY_ATTRS, struct drm_intel_overlay_put_image) +#define DRM_IOCTL_I915_OVERLAY_PUT_IMAGE DRM_IOW(DRM_COMMAND_BASE + DRM_I915_OVERLAY_PUT_IMAGE, struct drm_intel_overlay_put_image)#define DRM_IOCTL_I915_OVERLAY_ATTRS DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_OVERLAY_ATTRS, struct drm_intel_overlay_attrs)/* Allow drivers to submit batchbuffers directly to hardware, relying
include/linux/netdevice.h +4 -1
@@ -1226,9 +1226,12 @@ static inline int skb_gro_header_hard(struct sk_buff *skb, unsigned int hlen)static inline void *skb_gro_header_slow (struct sk_buff *skb,unsigned int hlen,unsigned int offset) { +if (!pskb_may_pull (skb, hlen)) +return NULL ; +NAPI_GRO_CB (skb)->frag0 =NULL ;NAPI_GRO_CB (skb)->frag0_len =0 ; -return pskb_may_pull (skb, hlen) ? skb->data + offset :NULL ; +return skb->data + offset; }static inline void *skb_gro_mac_header (struct sk_buff *skb)
net/bridge/br_private.h +1 -0
@@ -75,6 +75,7 @@ struct net_bridge_portbridge_id designated_bridge;u32 path_cost;u32 designated_cost; +unsigned long designated_age;struct timer_list forward_delay_timer;struct timer_list hold_timer;
net/bridge/br_stp.c +2 -2
@@ -165,8 +165,7 @@ void br_transmit_config(struct net_bridge_port *p)else {struct net_bridge_port *root =br_get_port (br, br->root_port); - bpdu.message_age = br->max_age - - (root->message_age_timer.expires - jiffies) + bpdu.message_age = (jiffies - root->designated_age) +MESSAGE_AGE_INCR ; } bpdu.max_age = br->max_age;
@@ -190,6 +189,7 @@ static inline void br_record_config_information(struct net_bridge_port *p, p->designated_cost = bpdu->root_path_cost; p->designated_bridge = bpdu->bridge_id; p->designated_port = bpdu->port_id; + p->designated_age = jiffies + bpdu->message_age;mod_timer (&p->message_age_timer, jiffies + (p->br->max_age - bpdu->message_age));
net/ipv4/ip_gre.c +10 -9
@@ -1667,14 +1667,15 @@ static int __init ipgre_init(void)printk (KERN_INFO "GRE over IPv4 tunneling driver\n" ); -if (inet_add_protocol (&ipgre_protocol,IPPROTO_GRE ) <0 ) { -printk (KERN_INFO "ipgre init: can't add protocol\n" ); -return -EAGAIN ; - } - err =register_pernet_device (&ipgre_net_ops);if (err <0 ) - goto gen_device_failed; +return err; + + err =inet_add_protocol (&ipgre_protocol,IPPROTO_GRE ); +if (err <0 ) { +printk (KERN_INFO "ipgre init: can't add protocol\n" ); + goto add_proto_failed; + } err =rtnl_link_register (&ipgre_link_ops);if (err <0 )
@@ -1690,9 +1691,9 @@ out: tap_ops_failed:rtnl_link_unregister (&ipgre_link_ops); rtnl_link_failed: -unregister_pernet_device (&ipgre_net_ops); -gen_device_failed:inet_del_protocol (&ipgre_protocol,IPPROTO_GRE ); +add_proto_failed: +unregister_pernet_device (&ipgre_net_ops); goto out; }
@@ -1700,9 +1701,9 @@ static void __exit ipgre_fini(void) {rtnl_link_unregister (&ipgre_tap_ops);rtnl_link_unregister (&ipgre_link_ops); -unregister_pernet_device (&ipgre_net_ops);if (inet_del_protocol (&ipgre_protocol,IPPROTO_GRE ) <0 )printk (KERN_INFO "ipgre close: can't remove protocol\n" ); +unregister_pernet_device (&ipgre_net_ops); }module_init (ipgre_init);
net/ipv6/xfrm6_tunnel.c +11 -5
@@ -353,13 +353,19 @@ static struct xfrm6_tunnel xfrm46_tunnel_handler = {static int __init xfrm6_tunnel_init (void ) { -if (xfrm_register_type (&xfrm6_tunnel_type,AF_INET6 ) <0 ) +int rv; + + rv =xfrm_register_type (&xfrm6_tunnel_type,AF_INET6 ); +if (rv <0 ) goto err; -if (xfrm6_tunnel_register (&xfrm6_tunnel_handler,AF_INET6 )) + rv =xfrm6_tunnel_register (&xfrm6_tunnel_handler,AF_INET6 ); +if (rv <0 ) goto unreg; -if (xfrm6_tunnel_register (&xfrm46_tunnel_handler,AF_INET )) + rv =xfrm6_tunnel_register (&xfrm46_tunnel_handler,AF_INET ); +if (rv <0 ) goto dereg6; -if (xfrm6_tunnel_spi_init () <0 ) + rv =xfrm6_tunnel_spi_init (); +if (rv <0 ) goto dereg46;return 0 ;
@@ -370,7 +376,7 @@ dereg6: unreg:xfrm_unregister_type (&xfrm6_tunnel_type,AF_INET6 ); err: -return -EAGAIN ; +return rv; } static void __exit xfrm6_tunnel_fini(void)
net/mac80211/mlme.c +3 -0
@@ -2318,6 +2318,9 @@ void ieee80211_sta_restart(struct ieee80211_sub_if_data *sdata) {struct ieee80211_if_managed *ifmgd = &sdata->u.mgd; +if (!ifmgd->associated) +return ; +if (test_and_clear_bit (TMR_RUNNING_TIMER , &ifmgd->timers_running))add_timer (&ifmgd->timer);if (test_and_clear_bit (TMR_RUNNING_CHANSW , &ifmgd->timers_running))
net/sunrpc/rpcb_clnt.c +1 -1
@@ -579,7 +579,7 @@ void rpcb_getport_async(struct rpc_task *task)u32 bind_version;struct rpc_xprt *xprt;struct rpc_clnt *rpcb_clnt; -static struct rpcbind_args *map; +struct rpcbind_args *map;struct rpc_task *child;struct sockaddr_storage addr;struct sockaddr *sap = (struct sockaddr *)&addr;
net/sunrpc/sched.c +11 -16
@@ -628,30 +628,25 @@ static void __rpc_execute(struct rpc_task *task)BUG_ON (RPC_IS_QUEUED (task));for (;;) { +void (*do_action)(struct rpc_task *);/* -* Execute any pending callback. +* Execute any pending callback first. */ -if (task->tk_callback) { -void (*save_callback)(struct rpc_task *); - -/* -* We set tk_callback to NULL before calling it, -* in case it sets the tk_callback field itself: -*/ - save_callback = task->tk_callback; - task->tk_callback =NULL ; -save_callback (task); - }else { + do_action = task->tk_callback; + task->tk_callback =NULL ; +if (do_action ==NULL ) {/* * Perform the next FSM step. -* tk_action may be NULL when the task has been killed -* by someone else. +* tk_action may be NULL if the task has been killed. +* In particular, note that rpc_killall_tasks may +* do this at any time, so beware when dereferencing. */ -if (task->tk_action ==NULL ) + do_action = task->tk_action; +if (do_action ==NULL )break ; - task->tk_action (task); } +do_action (task);/* * Lockless check for whether task is sleeping or not.
net/sunrpc/svc_xprt.c +6 -5
@@ -884,12 +884,13 @@ void svc_delete_xprt(struct svc_xprt *xprt)if (!test_and_set_bit (XPT_DETACHED , &xprt->xpt_flags))list_del_init (&xprt->xpt_list);/* -* We used to delete the transport from whichever list -* it's sk_xprt.xpt_ready node was on, but we don't actually -* need to. This is because the only time we're called -* while still attached to a queue, the queue itself -* is about to be destroyed (in svc_destroy). +* The only time we're called while xpt_ready is still on a list +* is while the list itself is about to be destroyed (in +* svc_destroy). BUT svc_xprt_enqueue could still be attempting +* to add new entries to the sp_sockets list, so we can't leave +* a freed xprt on it. */ +list_del_init (&xprt->xpt_ready);if (test_bit (XPT_TEMP , &xprt->xpt_flags)) serv->sv_tmpcnt--;
sound/core/pcm_compat.c +1 -1
@@ -341,7 +341,7 @@ static int snd_pcm_ioctl_xfern_compat(struct snd_pcm_substream *substream,kfree (bufs);return -EFAULT ; } - bufs[ch] =compat_ptr (ptr); + bufs[i] =compat_ptr (ptr); bufptr++; }if (dir ==SNDRV_PCM_STREAM_PLAYBACK )
sound/soc/blackfin/bf5xx-i2s-pcm.c +11 -2
@@ -139,11 +139,20 @@ static snd_pcm_uframes_t bf5xx_pcm_pointer(struct snd_pcm_substream *substream)pr_debug ("%s enter\n" , __func__);if (substream->stream ==SNDRV_PCM_STREAM_PLAYBACK ) { diff =sport_curr_offset_tx (sport); - frames =bytes_to_frames (substream->runtime, diff); }else { diff =sport_curr_offset_rx (sport); - frames =bytes_to_frames (substream->runtime, diff); } + +/* +* TX at least can report one frame beyond the end of the +* buffer if we hit the wraparound case - clamp to within the +* buffer as the ALSA APIs require. +*/ +if (diff ==snd_pcm_lib_buffer_bytes (substream)) + diff =0 ; + + frames =bytes_to_frames (substream->runtime, diff); +return frames; }