Linux 3.4.63
Greg KH
maintainerI'm announcing the release of the 3.4.63 kernel.
All users of the 3.4 kernel series must upgrade.
The updated 3.4.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.4.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/arm/mach-versatile/pci.c | 6 +- arch/mips/ath79/clock.c | 2 arch/powerpc/kernel/align.c | 10 +++ crypto/api.c | 7 ++ drivers/gpu/drm/drm_edid.c | 3 + drivers/hid/hid-core.c | 17 ++++-- drivers/hid/hid-ids.h | 1 drivers/hid/hid-input.c | 12 +++- drivers/hid/hid-ntrig.c | 3 - drivers/hid/hid-pl.c | 10 ++- drivers/hid/hid-speedlink.c | 11 ++- drivers/hid/usbhid/hid-quirks.c | 2 drivers/iommu/intel-iommu.c | 72 ++++++++++++-------------- drivers/mmc/host/tmio_mmc_dma.c | 4 - drivers/net/wireless/ath/ath9k/ar9003_phy.c | 4 + drivers/net/wireless/ath/ath9k/ath9k.h | 5 - drivers/net/wireless/ath/ath9k/recv.c | 17 ++++-- drivers/net/wireless/ath/ath9k/xmit.c | 1 drivers/net/wireless/brcm80211/brcmsmac/dma.c | 15 +++-- drivers/of/base.c | 1 drivers/scsi/sd.c | 11 +-- drivers/staging/comedi/drivers/dt282x.c | 3 - drivers/usb/class/cdc-wdm.c | 13 +++- drivers/usb/core/config.c | 3 - drivers/usb/host/ehci-mxc.c | 2 drivers/usb/host/xhci-plat.c | 2 drivers/usb/host/xhci.c | 29 ++++++++++ drivers/usb/host/xhci.h | 1 drivers/usb/serial/mos7720.c | 6 +- drivers/xen/grant-table.c | 13 +++- fs/cifs/connect.c | 2 fs/fuse/dir.c | 4 + fs/fuse/file.c | 3 - fs/isofs/inode.c | 16 +---- fs/ocfs2/extent_map.c | 1 include/linux/hid.h | 4 + include/linux/rculist.h | 5 + include/media/v4l2-ctrls.h | 1 mm/huge_memory.c | 2 mm/memcontrol.c | 8 ++ sound/pci/hda/hda_intel.c | 1 sound/soc/codecs/wm8960.c | 6 +- 43 files changed, 230 insertions(+), 111 deletions(-)
Alan Stern (1):
SCSI: sd: Fix potential out-of-bounds access
Alex Deucher (1):
drm/edid: add quirk for Medion MD30217PG
Alex Williamson (1):
intel-iommu: Fix leaks in pagetable freeing
Anand Avati (1):
fuse: invalidate inode attributes on xattr modification
Andrzej Hajda (1):
media: v4l2: added missing mutex.h include to v4l2-ctrls.h
Anton Blanchard (1):
powerpc: Handle unaligned ldbrx/stdbrx
Dan Carpenter (2):
staging: comedi: dt282x: dt282x_ai_insn_read() always fails
USB: mos7720: use GFP_ATOMIC under spinlock
Daniel Mack (1):
usb: ehci-mxc: check for pdata before dereferencing
Felix Fietkau (4):
ath9k: always clear ps filter bit on new assoc
ath9k: fix rx descriptor related race condition
ath9k: avoid accessing MRC registers on single-chain devices
MIPS: ath79: Fix ar933x watchdog clock
Grant Likely (1):
of: Fix missing memory initialization on FDT unflattening
Greg Kroah-Hartman (1):
Linux 3.4.63
Greg Thelen (1):
memcg: fix multiple large threshold notifications
Hans de Goede (1):
usb: config->desc.bLength may not exceed amount of data returned by the device
Herbert Xu (1):
crypto: api - Fix race condition in larval lookup
Jan Kara (1):
isofs: Refuse RW mount of the filesystem instead of making it RO
Jeff Layton (1):
cifs: ensure that srv_mutex is held when dealing with ssocket pointer
Jie Liu (1):
ocfs2: fix the end cluster offset of FIEMAP
Jiri Kosina (1):
HID: battery: don't do DMA from stack
Johan Hovold (1):
USB: mos7720: fix big-endian control requests
John W. Linville (1):
brcmsmac: Fix WARNING caused by lack of calls to dma_mapping_error()
Kees Cook (4):
HID: pantherlord: validate output report details
HID: validate HID report id size
HID: ntrig: validate feature report details
HID: check for NULL field when setting values
Libin (1):
mm/huge_memory.c: fix potential NULL pointer dereference
Maxim Patlasov (1):
fuse: postpone end_page_writeback() in fuse_writepage_locked()
Mike Dyer (1):
ASoC: wm8960: Fix PLL register writes
Oliver Neukum (1):
USB: cdc-wdm: fix race between interrupt handler and tasklet
Peter Maydell (1):
ARM: PCI: versatile: Fix SMAP register offsets
Roger Pau Monne (1):
xen-gnt: prevent adding duplicate gnt callbacks
Sarah Sharp (1):
xhci-plat: Don't enable legacy PCI interrupts.
Sergei Shtylyov (1):
mmc: tmio_mmc_dma: fix PIO fallback on SDHI
Shawn Nematbakhsh (1):
usb: xhci: Disable runtime PM suspend for quirky controllers
Stefan Kriwanek (1):
HID: Fix Speedlink VAD Cezanne support for some devices
Takashi Iwai (1):
ALSA: hda - Add Toshiba Satellite C870 to MSI blacklist
Tejun Heo (1):
rculist: list_first_or_null_rcu() should use list_entry_rcu()
Vasily Titskiy (1):
HID: usbhid: quirk for N-Trig DuoSense Touch Screen
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 62 +SUBLEVEL = 63 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/mach-versatile/pci.c +3 -3
@@ -42,9 +42,9 @@#define PCI_IMAP0 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x0)#define PCI_IMAP1 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x4)#define PCI_IMAP2 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x8) -#define PCI_SMAP0 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x10) -#define PCI_SMAP1 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x14) -#define PCI_SMAP2 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x18) +#define PCI_SMAP0 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x14) +#define PCI_SMAP1 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x18) +#define PCI_SMAP2 __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0x1c)#define PCI_SELFID __IO_ADDRESS(VERSATILE_PCI_CORE_BASE+0xc)#define DEVICE_ID_OFFSET 0x00
arch/mips/ath79/clock.c +1 -1
@@ -159,7 +159,7 @@ static void __init ar933x_clocks_init(void) ath79_ahb_clk.rate = freq / t; } - ath79_wdt_clk.rate = ath79_ref_clk.rate; + ath79_wdt_clk.rate = ath79_ahb_clk.rate; ath79_uart_clk.rate = ath79_ref_clk.rate; }
arch/powerpc/kernel/align.c +10 -0
@@ -764,6 +764,16 @@ int fix_alignment(struct pt_regs *regs) nb = aligninfo[instr].len; flags = aligninfo[instr].flags; +/* ldbrx/stdbrx overlap lfs/stfs in the DSISR unfortunately */ +if (IS_XFORM (instruction) && ((instruction >>1 ) &0x3ff ) ==532 ) { + nb =8 ; + flags =LD +SW ; + }else if (IS_XFORM (instruction) && + ((instruction >>1 ) &0x3ff ) ==660 ) { + nb =8 ; + flags =ST +SW ; + } +/* Byteswap little endian loads and stores */ swiz =0 ;if (regs->msr &MSR_LE ) {
crypto/api.c +6 -1
@@ -40,6 +40,8 @@ static inline struct crypto_alg *crypto_alg_get(struct crypto_alg *alg)return alg; } +static struct crypto_alg *crypto_larval_wait (struct crypto_alg *alg); +struct crypto_alg *crypto_mod_get (struct crypto_alg *alg) {return try_module_get (alg->cra_module) ?crypto_alg_get (alg) :NULL ;
@@ -150,8 +152,11 @@ static struct crypto_alg *crypto_larval_add(const char *name, u32 type, }up_write (&crypto_alg_sem); -if (alg != &larval->alg) +if (alg != &larval->alg) {kfree (larval); +if (crypto_is_larval (alg)) + alg =crypto_larval_wait (alg); + }return alg; }
drivers/gpu/drm/drm_edid.c +3 -0
@@ -125,6 +125,9 @@ static struct edid_quirk {/* ViewSonic VA2026w */ { "VSC", 5020, EDID_QUIRK_FORCE_REDUCED_BLANKING }, + +/* Medion MD 30217 PG */ + { "MED", 0x7b8, EDID_QUIRK_PREFER_LARGE_75 }, };/*** DDC fetch and block validation ***/
drivers/hid/hid-core.c +13 -4
@@ -63,6 +63,8 @@ struct hid_report *hid_register_report(struct hid_device *device, unsigned type,struct hid_report_enum *report_enum = device->report_enum + type;struct hid_report *report; +if (id >=HID_MAX_IDS ) +return NULL ;if (report_enum->report_id_hash[id])return report_enum->report_id_hash[id];
@@ -385,8 +387,10 @@ static int hid_parser_global(struct hid_parser *parser, struct hid_item *item)case HID_GLOBAL_ITEM_TAG_REPORT_ID : parser->global.report_id =item_udata (item); -if (parser->global.report_id ==0 ) { -hid_err (parser->device,"report_id 0 is invalid\n" ); +if (parser->global.report_id ==0 || + parser->global.report_id >=HID_MAX_IDS ) { +hid_err (parser->device,"report_id %u is invalid\n" , + parser->global.report_id);return -1 ; }return 0 ;
@@ -557,7 +561,7 @@ static void hid_device_release(struct device *dev)for (i =0 ; i <HID_REPORT_TYPES ; i++) {struct hid_report_enum *report_enum = device->report_enum + i; -for (j =0 ; j <256 ; j++) { +for (j =0 ; j <HID_MAX_IDS ; j++) {struct hid_report *report = report_enum->report_id_hash[j];if (report)hid_free_report (report);
@@ -995,7 +999,12 @@ EXPORT_SYMBOL_GPL(hid_output_report);int hid_set_field (struct hid_field *field,unsigned offset,__s32 value) { -unsigned size = field->report_size; +unsigned size; + +if (!field) +return -1 ; + + size = field->report_size;hid_dump_input (field->report->device, field->usage + offset, value);
drivers/hid/hid-ids.h +1 -0
@@ -595,6 +595,7 @@#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_16 0x0012#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_17 0x0013#define USB_DEVICE_ID_NTRIG_TOUCH_SCREEN_18 0x0014 +#define USB_DEVICE_ID_NTRIG_DUOSENSE 0x1500#define USB_VENDOR_ID_ONTRAK 0x0a07#define USB_DEVICE_ID_ONTRAK_ADU100 0x0064
drivers/hid/hid-input.c +10 -2
@@ -314,7 +314,7 @@ static int hidinput_get_battery_property(struct power_supply *psy, { struct hid_device *dev = container_of(psy, struct hid_device, battery);int ret =0 ; -__u8 buf[2 ] = {}; +__u8 *buf;switch (prop) {case POWER_SUPPLY_PROP_PRESENT :
@@ -323,13 +323,20 @@ static int hidinput_get_battery_property(struct power_supply *psy,break ;case POWER_SUPPLY_PROP_CAPACITY : + + buf =kmalloc (2 *sizeof (__u8),GFP_KERNEL ); +if (!buf) { + ret = -ENOMEM ; +break ; + } ret = dev->hid_get_raw_report (dev, dev->battery_report_id, - buf,sizeof (buf), + buf,2 , dev->battery_report_type);if (ret !=2 ) {if (ret >=0 ) ret = -EINVAL ; +kfree (buf);break ; }
@@ -338,6 +345,7 @@ static int hidinput_get_battery_property(struct power_supply *psy, buf[1] <= dev->battery_max) val->intval = (100 * (buf[1 ] - dev->battery_min)) / (dev->battery_max - dev->battery_min); +kfree (buf);break ;case POWER_SUPPLY_PROP_MODEL_NAME :
drivers/hid/hid-ntrig.c +2 -1
@@ -115,7 +115,8 @@ static inline int ntrig_get_mode(struct hid_device *hdev)struct hid_report *report = hdev->report_enum[HID_FEATURE_REPORT ]. report_id_hash[0x0d ]; -if (!report) +if (!report || report->maxfield <1 || + report->field[0 ]->report_count <1 )return -EINVAL ;usbhid_submit_report (hdev, report,USB_DIR_IN );
drivers/hid/hid-pl.c +8 -2
@@ -129,8 +129,14 @@ static int plff_init(struct hid_device *hid) strong = &report->field[0 ]->value[2 ]; weak = &report->field[0 ]->value[3 ];debug ("detected single-field device" ); - }else if (report->maxfield >=4 && report->field[0 ]->maxusage ==1 && - report->field[0 ]->usage[0 ].hid == (HID_UP_LED |0x43 )) { + }else if (report->field[0 ]->maxusage ==1 && + report->field[0 ]->usage[0 ].hid == + (HID_UP_LED |0x43 ) && + report->maxfield >=4 && + report->field[0 ]->report_count >=1 && + report->field[1 ]->report_count >=1 && + report->field[2 ]->report_count >=1 && + report->field[3 ]->report_count >=1 ) { report->field[0 ]->value[0 ] =0x00 ; report->field[1 ]->value[0 ] =0x00 ; strong = &report->field[2 ]->value[0 ];
drivers/hid/hid-speedlink.c +8 -3
@@ -3,7 +3,7 @@* Fixes "jumpy" cursor and removes nonexistent keyboard LEDS from * the HID descriptor. * -* Copyright (c) 2011 Stefan Kriwanek <[email protected]> +* Copyright (c) 2011, 2013 Stefan Kriwanek <[email protected]> */ /*
@@ -48,8 +48,13 @@ static int speedlink_event(struct hid_device *hdev, struct hid_field *field, struct hid_usage *usage, __s32 value) {/* No other conditions due to usage_table. */ -/* Fix "jumpy" cursor (invalid events sent by device). */ -if (value ==256 ) + +/* This fixes the "jumpy" cursor occuring due to invalid events sent +* by the device. Some devices only send them with value==+256, others +* don't. However, catching abs(value)>=256 is restrictive enough not +* to interfere with devices that were bug-free (has been tested). +*/ +if (abs (value) >=256 )return 1 ;/* Drop useless distance 0 events (on button clicks etc.) as well */ if (value ==0 )
drivers/hid/usbhid/hid-quirks.c +2 -0
@@ -103,6 +103,8 @@ static const struct hid_blacklist { { USB_VENDOR_ID_SIGMA_MICRO, USB_DEVICE_ID_SIGMA_MICRO_KEYBOARD, HID_QUIRK_NO_INIT_REPORTS }, { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_MOUSEPEN_I608X, HID_QUIRK_MULTI_INPUT }, { USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_EASYPEN_M610X, HID_QUIRK_MULTI_INPUT }, + { USB_VENDOR_ID_NTRIG, USB_DEVICE_ID_NTRIG_DUOSENSE, HID_QUIRK_NO_INIT_REPORTS }, + { 0, 0 } };
drivers/iommu/intel-iommu.c +35 -37
91 lines not on this page · raw message
drivers/mmc/host/tmio_mmc_dma.c +2 -2
@@ -104,6 +104,7 @@ static void tmio_mmc_start_dma_rx(struct tmio_mmc_host *host) pio:if (!desc) {/* DMA failed, fall back to PIO */ +tmio_mmc_enable_dma (host, false);if (ret >=0 ) ret = -EIO ; host->chan_rx =NULL ;
@@ -116,7 +117,6 @@ pio: }dev_warn (&host->pdev->dev,"DMA failed: %d, falling back to PIO\n" , ret); -tmio_mmc_enable_dma (host, false); } dev_dbg(&host->pdev->dev, "%s(): desc %p, cookie %d, sg[%d]\n", __func__,
@@ -185,6 +185,7 @@ static void tmio_mmc_start_dma_tx(struct tmio_mmc_host *host) pio:if (!desc) {/* DMA failed, fall back to PIO */ +tmio_mmc_enable_dma (host, false);if (ret >=0 ) ret = -EIO ; host->chan_tx =NULL ;
@@ -197,7 +198,6 @@ pio: }dev_warn (&host->pdev->dev,"DMA failed: %d, falling back to PIO\n" , ret); -tmio_mmc_enable_dma (host, false); } dev_dbg(&host->pdev->dev, "%s(): desc %p, cookie %d\n", __func__,
drivers/net/wireless/ath/ath9k/ar9003_phy.c +4 -0
@@ -1030,6 +1030,10 @@ static bool ar9003_hw_ani_control(struct ath_hw *ah,* is_on == 0 means MRC CCK is OFF (more noise imm) */ bool is_on = param ?1 :0 ; + +if (ah->caps.rx_chainmask ==1 ) +break ; +REG_RMW_FIELD (ah,AR_PHY_MRC_CCK_CTRL ,AR_PHY_MRC_CCK_ENABLE , is_on); REG_RMW_FIELD(ah, AR_PHY_MRC_CCK_CTRL,
drivers/net/wireless/ath/ath9k/ath9k.h +1 -4
@@ -78,10 +78,6 @@ struct ath_config { sizeof(struct ath_buf_state)); \ }while (0 ) -#define ATH_RXBUF_RESET (_bf) do { \ - (_bf)->bf_stale = false; \ - } while (0) -/** * enum buffer_type - Buffer type flags *
@@ -314,6 +310,7 @@ struct ath_rx {struct ath_buf *rx_bufptr;struct ath_rx_edma rx_edma[ATH9K_RX_QUEUE_MAX ]; +struct ath_buf *buf_hold;struct sk_buff *frag; };
drivers/net/wireless/ath/ath9k/recv.c +13 -4
@@ -78,8 +78,6 @@ static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf)struct ath_desc *ds;struct sk_buff *skb; -ATH_RXBUF_RESET (bf); - ds = bf->bf_desc; ds->ds_link =0 ;/* link to null */ ds->ds_data = bf->bf_buf_addr;
@@ -106,6 +104,14 @@ static void ath_rx_buf_link(struct ath_softc *sc, struct ath_buf *bf) sc->rx.rxlink = &ds->ds_link; } +static void ath_rx_buf_relink (struct ath_softc *sc,struct ath_buf *bf) +{ +if (sc->rx.buf_hold) +ath_rx_buf_link (sc, sc->rx.buf_hold); + + sc->rx.buf_hold = bf; +} +static void ath_setdefantenna (struct ath_softc *sc,u32 antenna) {/* XXX block beacon interrupts */
@@ -153,7 +159,6 @@ static bool ath_rx_edma_buf_link(struct ath_softc *sc, skb = bf->bf_mpdu; -ATH_RXBUF_RESET (bf);memset (skb->data,0 , ah->caps.rx_status_len);dma_sync_single_for_device (sc->dev, bf->bf_buf_addr, ah->caps.rx_status_len,DMA_TO_DEVICE );
@@ -485,6 +490,7 @@ int ath_startrecv(struct ath_softc *sc)if (list_empty (&sc->rx.rxbuf)) goto start_recv; + sc->rx.buf_hold =NULL ; sc->rx.rxlink =NULL ;list_for_each_entry_safe (bf, tbf, &sc->rx.rxbuf, list) {ath_rx_buf_link (sc, bf);
@@ -734,6 +740,9 @@ static struct ath_buf *ath_get_next_rx_buf(struct ath_softc *sc, } bf = list_first_entry(&sc->rx.rxbuf, struct ath_buf, list); +if (bf == sc->rx.buf_hold) +return NULL ; + ds = bf->bf_desc;/*
@@ -1974,7 +1983,7 @@ requeue:if (edma) {ath_rx_edma_buf_link (sc, qtype); }else { -ath_rx_buf_link (sc, bf); +ath_rx_buf_relink (sc, bf);ath9k_hw_rxena (ah); } }while (1 );
drivers/net/wireless/ath/ath9k/xmit.c +1 -0
@@ -2479,6 +2479,7 @@ void ath_tx_node_init(struct ath_softc *sc, struct ath_node *an)for (acno =0 , ac = &an->ac[acno]; acno <WME_NUM_AC ; acno++, ac++) { ac->sched = false; + ac->clear_ps_filter = true; ac->txq = sc->tx.txq_map[acno];INIT_LIST_HEAD (&ac->tid_q); }
drivers/net/wireless/brcm80211/brcmsmac/dma.c +11 -4
@@ -1013,9 +1013,10 @@ static bool dma64_rxidle(struct dma_info *di)/* * post receive buffers -* return false is refill failed completely and ring is empty this will stall -* the rx dma and user might want to call rxfill again asap. This unlikely -* happens on memory-rich NIC, but often on memory-constrained dongle +* Return false if refill failed completely or dma mapping failed. The ring +* is empty, which will stall the rx dma and user might want to call rxfill +* again asap. This is unlikely to happen on a memory-rich NIC, but often on +* memory-constrained dongle. */ bool dma_rxfill (struct dma_pub *pub) {
@@ -1074,6 +1075,8 @@ bool dma_rxfill(struct dma_pub *pub) pa =dma_map_single (di->dmadev, p->data, di->rxbufsize,DMA_FROM_DEVICE ); +if (dma_mapping_error (di->dmadev, pa)) +return false;/* save the free packet pointer */ di->rxp[rxout] = p;
@@ -1294,7 +1297,11 @@ int dma_txfast(struct dma_pub *pub, struct sk_buff *p, bool commit)/* get physical address of buffer start */ pa =dma_map_single (di->dmadev, data, len,DMA_TO_DEVICE ); - +/* if mapping failed, free skb */ +if (dma_mapping_error (di->dmadev, pa)) { +brcmu_pkt_buf_free_skb (p); +return ; + }/* With a DMA segment list, Descriptor table is filled * using the segment list instead of looping over * buffers in multi-chain DMA. Therefore, EOF for SGLIST
drivers/of/base.c +1 -0
@@ -1227,6 +1227,7 @@ void of_alias_scan(void * (*dt_alloc)(u64 size, u64 align)) ap =dt_alloc (sizeof (*ap) + len +1 ,4 );if (!ap)continue ; +memset (ap,0 ,sizeof (*ap) + len +1 ); ap->alias = start;of_alias_add (ap, np, id, start, len); }
drivers/scsi/sd.c +3 -8
@@ -2225,14 +2225,9 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer) } } -if (modepage ==0x3F ) { -sd_printk (KERN_ERR , sdkp,"No Caching mode page " -"present\n" ); - goto defaults; - }else if ((buffer[offset] &0x3f ) != modepage) { -sd_printk (KERN_ERR , sdkp,"Got wrong page\n" ); - goto defaults; - } +sd_printk (KERN_ERR , sdkp,"No Caching mode page found\n" ); + goto defaults; + Page_found:if (modepage ==8 ) { sdkp->WCE = ((buffer[offset +2 ] &0x04 ) !=0 );
drivers/staging/comedi/drivers/dt282x.c +2 -1
@@ -407,8 +407,9 @@ struct dt282x_private { } \udelay (5 ); \ } \ -if (_i) \ +if (_i) { \ b \ + } \ }while (0 ) static int dt282x_attach(struct comedi_device *dev,
drivers/usb/class/cdc-wdm.c +9 -4
@@ -233,6 +233,7 @@ skip_error:static void wdm_int_callback (struct urb *urb) {int rv =0 ; +int responding;int status = urb->status;struct wdm_device *desc;struct usb_cdc_notification *dr;
@@ -286,8 +287,8 @@ static void wdm_int_callback(struct urb *urb)spin_lock (&desc->iuspin);clear_bit (WDM_READ , &desc->flags); -set_bit (WDM_RESPONDING , &desc->flags); -if (!test_bit (WDM_DISCONNECTING , &desc->flags) + responding =test_and_set_bit (WDM_RESPONDING , &desc->flags); +if (!responding && !test_bit (WDM_DISCONNECTING , &desc->flags) && !test_bit (WDM_SUSPENDING , &desc->flags)) { rv =usb_submit_urb (desc->response,GFP_ATOMIC ); dev_dbg(&desc->intf->dev, "%s: usb_submit_urb %d",
@@ -687,16 +688,20 @@ static void wdm_rxwork(struct work_struct *work) { struct wdm_device *desc = container_of(work, struct wdm_device, rxwork);unsigned long flags; -int rv; +int rv =0 ; +int responding;spin_lock_irqsave (&desc->iuspin, flags);if (test_bit (WDM_DISCONNECTING , &desc->flags)) {spin_unlock_irqrestore (&desc->iuspin, flags); }else { + responding =test_and_set_bit (WDM_RESPONDING , &desc->flags);spin_unlock_irqrestore (&desc->iuspin, flags); - rv =usb_submit_urb (desc->response,GFP_KERNEL ); +if (!responding) + rv =usb_submit_urb (desc->response,GFP_KERNEL );if (rv <0 && rv != -EPERM ) {spin_lock_irqsave (&desc->iuspin, flags); +clear_bit (WDM_RESPONDING , &desc->flags);if (!test_bit (WDM_DISCONNECTING , &desc->flags))schedule_work (&desc->rxwork);spin_unlock_irqrestore (&desc->iuspin, flags);
drivers/usb/core/config.c +2 -1
@@ -424,7 +424,8 @@ static int usb_parse_configuration(struct usb_device *dev, int cfgidx,memcpy (&config->desc, buffer,USB_DT_CONFIG_SIZE );if (config->desc.bDescriptorType !=USB_DT_CONFIG || - config->desc.bLength <USB_DT_CONFIG_SIZE ) { + config->desc.bLength <USB_DT_CONFIG_SIZE || + config->desc.bLength > size) {dev_err (ddev,"invalid descriptor for config index %d: " "type = 0x%X, length = %d\n" , cfgidx, config->desc.bDescriptorType, config->desc.bLength);
drivers/usb/host/ehci-mxc.c +1 -1
@@ -298,7 +298,7 @@ static int __exit ehci_mxc_drv_remove(struct platform_device *pdev)if (pdata && pdata->exit) pdata->exit (pdev); -if (pdata->otg) +if (pdata && pdata->otg)usb_phy_shutdown (pdata->otg);usb_remove_hcd (hcd);
drivers/usb/host/xhci-plat.c +1 -1
@@ -24,7 +24,7 @@ static void xhci_plat_quirks(struct device *dev, struct xhci_hcd *xhci)* here that the generic code does not try to make a pci_dev from our * dev struct in order to setup MSI */ - xhci->quirks |=XHCI_BROKEN_MSI ; + xhci->quirks |=XHCI_PLAT ; }/* called during probe() after chip reset completes */
drivers/usb/host/xhci.c +28 -1
@@ -342,9 +342,14 @@ static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)static int xhci_try_enable_msi (struct usb_hcd *hcd) {struct xhci_hcd *xhci =hcd_to_xhci (hcd); -struct pci_dev *pdev =to_pci_dev (xhci_to_hcd (xhci)->self.controller); +struct pci_dev *pdev;int ret; +/* The xhci platform device has set up IRQs through usb_add_hcd. */ +if (xhci->quirks &XHCI_PLAT ) +return 0 ; + + pdev =to_pci_dev (xhci_to_hcd (xhci)->self.controller);/* * Some Fresco Logic host controllers advertise MSI, but fail to * generate interrupts. Don't even try to enable MSI.
@@ -3496,10 +3501,21 @@ void xhci_free_dev(struct usb_hcd *hcd, struct usb_device *udev) {struct xhci_hcd *xhci =hcd_to_xhci (hcd);struct xhci_virt_device *virt_dev; +struct device *dev = hcd->self.controller;unsigned long flags;u32 state;int i, ret; +#ifndef CONFIG_USB_DEFAULT_PERSIST +/* +* We called pm_runtime_get_noresume when the device was attached. +* Decrement the counter here to allow controller to runtime suspend +* if no devices remain. +*/ +if (xhci->quirks &XHCI_RESET_ON_RESUME ) +pm_runtime_put_noidle (dev); +#endif + ret =xhci_check_args (hcd, udev,NULL ,0 , true, __func__);/* If the host is halted due to driver unload, we still need to free the * device.
@@ -3571,6 +3587,7 @@ static int xhci_reserve_host_control_ep_resources(struct xhci_hcd *xhci)int xhci_alloc_dev (struct usb_hcd *hcd,struct usb_device *udev) {struct xhci_hcd *xhci =hcd_to_xhci (hcd); +struct device *dev = hcd->self.controller;unsigned long flags;int timeleft;int ret;
@@ -3623,6 +3640,16 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev) goto disable_slot; } udev->slot_id = xhci->slot_id; + +#ifndef CONFIG_USB_DEFAULT_PERSIST +/* +* If resetting upon resume, we can't put the controller into runtime +* suspend if there is a device attached. +*/ +if (xhci->quirks &XHCI_RESET_ON_RESUME ) +pm_runtime_get_noresume (dev); +#endif +/* Is this a LS or FS device under a HS hub? */ /* Hub or peripherial? */ return 1 ;
drivers/usb/host/xhci.h +1 -0
@@ -1508,6 +1508,7 @@ struct xhci_hcd {#define XHCI_SPURIOUS_REBOOT (1 << 13)#define XHCI_COMP_MODE_QUIRK (1 << 14)#define XHCI_AVOID_BEI (1 << 15) +#define XHCI_PLAT (1 << 16)unsigned int num_active_eps;unsigned int limit_active_eps;/* There are two roothubs to keep track of bus suspend info for */
drivers/usb/serial/mos7720.c +3 -3
@@ -383,7 +383,7 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport,kfree (urbtrack);return -ENOMEM ; } - urbtrack->setup =kmalloc (sizeof (*urbtrack->setup),GFP_KERNEL ); + urbtrack->setup =kmalloc (sizeof (*urbtrack->setup),GFP_ATOMIC );if (!urbtrack->setup) {usb_free_urb (urbtrack->urb);kfree (urbtrack);
@@ -391,8 +391,8 @@ static int write_parport_reg_nonblock(struct mos7715_parport *mos_parport, } urbtrack->setup->bRequestType = (__u8 )0x40 ; urbtrack->setup->bRequest = (__u8 )0x0e ; - urbtrack->setup->wValue =get_reg_value (reg, dummy); - urbtrack->setup->wIndex =get_reg_index (reg); + urbtrack->setup->wValue =cpu_to_le16 (get_reg_value (reg, dummy)); + urbtrack->setup->wIndex =cpu_to_le16 (get_reg_index (reg)); urbtrack->setup->wLength =0 ; usb_fill_control_urb(urbtrack->urb, usbdev, usb_sndctrlpipe(usbdev, 0),
drivers/xen/grant-table.c +11 -2
@@ -641,9 +641,18 @@ void gnttab_request_free_callback(struct gnttab_free_callback *callback, void (*fn)(void *), void *arg, u16 count) { unsigned long flags; +struct gnttab_free_callback *cb; +spin_lock_irqsave (&gnttab_list_lock, flags); -if (callback->next) - goto out; + +/* Check if the callback is already on the list */ + cb = gnttab_free_callback_list; +while (cb) { +if (cb == callback) + goto out; + cb = cb->next; + } + callback->fn = fn; callback->arg = arg; callback->count = count;
fs/cifs/connect.c +2 -0
@@ -362,6 +362,7 @@ cifs_reconnect(struct TCP_Server_Info *server)try_to_freeze ();/* we should try only the port we connected to before */ +mutex_lock (&server->srv_mutex); rc =generic_ip_connect (server);if (rc) {cFYI (1 ,"reconnect error %d" , rc);
@@ -373,6 +374,7 @@ cifs_reconnect(struct TCP_Server_Info *server) server->tcpStatus = CifsNeedNegotiate;spin_unlock (&GlobalMid_Lock); } +mutex_unlock (&server->srv_mutex); }while (server->tcpStatus == CifsNeedReconnect);return rc;
fs/fuse/dir.c +4 -0
@@ -1503,6 +1503,8 @@ static int fuse_setxattr(struct dentry *entry, const char *name, fc->no_setxattr =1 ; err = -EOPNOTSUPP ; } +if (!err) +fuse_invalidate_attr (inode);return err; }
@@ -1632,6 +1634,8 @@ static int fuse_removexattr(struct dentry *entry, const char *name) fc->no_removexattr =1 ; err = -EOPNOTSUPP ; } +if (!err) +fuse_invalidate_attr (inode);return err; }
fs/fuse/file.c +2 -1
@@ -1294,7 +1294,6 @@ static int fuse_writepage_locked(struct page *page)inc_bdi_stat (mapping->backing_dev_info,BDI_WRITEBACK );inc_zone_page_state (tmp_page,NR_WRITEBACK_TEMP ); -end_page_writeback (page);spin_lock (&fc->lock);list_add (&req->writepages_entry, &fi->writepages);
@@ -1302,6 +1301,8 @@ static int fuse_writepage_locked(struct page *page)fuse_flush_writepages (inode);spin_unlock (&fc->lock); +end_page_writeback (page); +return 0 ; err_free:
fs/isofs/inode.c +5 -11
@@ -119,8 +119,8 @@ static void destroy_inodecache(void)static int isofs_remount (struct super_block *sb,int *flags,char *data) { -/* we probably want a lot more here */ - *flags |=MS_RDONLY ; +if (!(*flags &MS_RDONLY )) +return -EROFS ;return 0 ; }
@@ -769,15 +769,6 @@ root_found:*/ s->s_maxbytes =0x80000000000LL ; -/* -* The CDROM is read-only, has no nodes (devices) on it, and since -* all of the files appear to be owned by root, we really do not want -* to allow suid. (suid or devices will not show up unless we have -* Rock Ridge extensions) -*/ - - s->s_flags |=MS_RDONLY /* | MS_NODEV | MS_NOSUID */ ; -/* Set this for reference. Its not currently used except on write which we don't have .. */
@@ -1536,6 +1527,9 @@ struct inode *isofs_iget(struct super_block *sb,static struct dentry *isofs_mount (struct file_system_type *fs_type,int flags,const char *dev_name,void *data) { +/* We don't support read-write mounts */ +if (!(flags &MS_RDONLY )) +return ERR_PTR (-EACCES );return mount_bdev (fs_type, flags, dev_name, data, isofs_fill_super); }
fs/ocfs2/extent_map.c +0 -1
@@ -782,7 +782,6 @@ int ocfs2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo, cpos = map_start >> osb->s_clustersize_bits; mapping_end =ocfs2_clusters_for_bytes (inode->i_sb, map_start + map_len); - mapping_end -= cpos; is_last =0 ;while (cpos < mapping_end && !is_last) {u32 fe_flags;
include/linux/hid.h +3 -1
@@ -420,10 +420,12 @@ struct hid_report {struct hid_device *device;/* associated device */ }; +#define HID_MAX_IDS 256 +struct hid_report_enum {unsigned numbered;struct list_head report_list; -struct hid_report *report_id_hash[256 ]; +struct hid_report *report_id_hash[HID_MAX_IDS ]; };#define HID_REPORT_TYPES 3
include/linux/rculist.h +3 -2
@@ -254,8 +254,9 @@ static inline void list_splice_init_rcu(struct list_head *list,*/ #define list_first_or_null_rcu (ptr, type, member) \ ({struct list_head *__ptr = (ptr); \ - struct list_head __rcu *__next = list_next_rcu(__ptr); \ - likely(__ptr != __next) ? container_of(__next, type, member) : NULL; \ + struct list_head *__next = ACCESS_ONCE(__ptr->next); \ + likely(__ptr != __next) ? \ + list_entry_rcu(__next, type, member) : NULL; \ })/**
include/media/v4l2-ctrls.h +1 -0
@@ -22,6 +22,7 @@#define _V4L2_CTRLS_H#include <linux/list.h> +#include <linux/mutex.h> #include <linux/videodev2.h> /* forward references */
mm/huge_memory.c +2 -0
@@ -1894,6 +1894,8 @@ static void collapse_huge_page(struct mm_struct *mm, goto out; vma =find_vma (mm, address); +if (!vma) + goto out; hstart = (vma->vm_start + ~HPAGE_PMD_MASK ) &HPAGE_PMD_MASK ; hend = vma->vm_end &HPAGE_PMD_MASK ;if (address < hstart || address +HPAGE_PMD_SIZE > hend)
mm/memcontrol.c +7 -1
@@ -4349,7 +4349,13 @@ static int compare_thresholds(const void *a, const void *b)const struct mem_cgroup_threshold *_a = a;const struct mem_cgroup_threshold *_b = b; -return _a->threshold - _b->threshold; +if (_a->threshold > _b->threshold) +return 1 ; + +if (_a->threshold < _b->threshold) +return -1 ; + +return 0 ; }static int mem_cgroup_oom_notify_cb (struct mem_cgroup *memcg)
sound/pci/hda/hda_intel.c +1 -0
@@ -2602,6 +2602,7 @@ static struct snd_pci_quirk msi_black_list[] __devinitdata = {SND_PCI_QUIRK (0x1043 ,0x81f2 ,"ASUS" ,0 ),/* Athlon64 X2 + nvidia */ SND_PCI_QUIRK (0x1043 ,0x81f6 ,"ASUS" ,0 ),/* nvidia */ SND_PCI_QUIRK (0x1043 ,0x822d ,"ASUS" ,0 ),/* Athlon64 X2 + nvidia MCP55 */ +SND_PCI_QUIRK (0x1179 ,0xfb44 ,"Toshiba Satellite C870" ,0 ),/* AMD Hudson */ SND_PCI_QUIRK (0x1849 ,0x0888 ,"ASRock" ,0 ),/* Athlon64 X2 + nvidia */ SND_PCI_QUIRK(0xa0a0, 0x0575, "Aopen MZ915-M", 0), /* ICH6 */ {}
sound/soc/codecs/wm8960.c +3 -3
@@ -790,9 +790,9 @@ static int wm8960_set_dai_pll(struct snd_soc_dai *codec_dai, int pll_id,if (pll_div.k) { reg |=0x20 ; -snd_soc_write (codec,WM8960_PLL2 , (pll_div.k >>18 ) &0x3f ); -snd_soc_write (codec,WM8960_PLL3 , (pll_div.k >>9 ) &0x1ff ); -snd_soc_write (codec,WM8960_PLL4 , pll_div.k &0x1ff ); +snd_soc_write (codec,WM8960_PLL2 , (pll_div.k >>16 ) &0xff ); +snd_soc_write (codec,WM8960_PLL3 , (pll_div.k >>8 ) &0xff ); +snd_soc_write (codec,WM8960_PLL4 , pll_div.k &0xff ); }snd_soc_write (codec,WM8960_PLL1 , reg);