Linux 3.4.65
Greg KH
maintainerI'm announcing the release of the 3.4.65 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/x86/kernel/reboot.c | 16 ++++++++++++++++ arch/x86/platform/efi/efi.c | 11 +++++++---- drivers/gpu/drm/i915/intel_dp.c | 13 ++++++++++++- drivers/gpu/drm/radeon/radeon_device.c | 15 ++++++++++++--- drivers/hid/hid-lg2ff.c | 19 +++---------------- drivers/hid/hid-lg3ff.c | 29 ++++++----------------------- drivers/hid/hid-lg4ff.c | 20 +------------------- drivers/hid/hid-lgff.c | 17 ++--------------- drivers/hwmon/applesmc.c | 11 ++++++++++- drivers/md/dm-snap-persistent.c | 2 +- drivers/md/dm-snap.c | 5 ++--- drivers/staging/vt6656/main_usb.c | 3 ++- drivers/usb/core/devio.c | 16 ++++++++++++++++ drivers/usb/host/xhci-hub.c | 2 +- drivers/usb/host/xhci-ring.c | 24 ++++++++++++++++++++++-- drivers/usb/host/xhci.c | 25 +++++-------------------- drivers/usb/host/xhci.h | 1 + mm/oom_kill.c | 8 ++++---- sound/core/compress_offload.c | 3 ++- 20 files changed, 126 insertions(+), 116 deletions(-)
Alex Deucher (1):
drm/radeon: disable tests/benchmarks if accel is disabled
David Rientjes (1):
mm, memcg: give exiting processes access to memory reserves
Florian Wolter (1):
xhci: Fix race between ep halt and URB cancellation
Greg Kroah-Hartman (1):
Linux 3.4.65
Henrik Rydberg (1):
hwmon: (applesmc) Check key count before proceeding
Jani Nikula (1):
drm/i915/dp: increase i2c-over-aux retry interval on AUX DEFER
Josh Boyer (1):
x86, efi: Don't map Boot Services on i386
Kees Cook (1):
HID: LG: validate HID output report details
Kurt Garloff (1):
usb/core/devio.c: Don't reject control message to endpoint with wrong direction bit
Liam Girdwood (1):
ALSA: compress: Fix compress device unregister.
Malcolm Priestley (1):
staging: vt6656: [BUG] main_usb.c oops on device_close move flag earlier.
Masoud Sharbiani (1):
x86/reboot: Add quirk to make Dell C6100 use reboot=pci automatically
Mathias Nyman (2):
xhci: Ensure a command structure points to the correct trb on the command ring
xhci: Fix oops happening after address device timeout
Mikulas Patocka (2):
dm snapshot: workaround for a false positive lockdep warning
dm-snapshot: fix performance degradation due to small hash size
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 64 +SUBLEVEL = 65 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/x86/kernel/reboot.c +16 -0
@@ -479,6 +479,22 @@ static struct dmi_system_id __initdata pci_reboot_dmi_table[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Precision M6600"), }, }, + { /* Handle problems with rebooting on the Dell PowerEdge C6100. */ + .callback = set_pci_reboot, + .ident = "Dell PowerEdge C6100", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), + }, + }, + {/* Some C6100 machines were shipped with vendor being 'Dell'. */ + .callback = set_pci_reboot, + .ident = "Dell PowerEdge C6100", + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell"), + DMI_MATCH(DMI_PRODUCT_NAME, "C6100"), + }, + }, { } };
arch/x86/platform/efi/efi.c +7 -4
@@ -845,10 +845,13 @@ void __init efi_enter_virtual_mode(void)for (p = memmap.map; p < memmap.map_end; p += memmap.desc_size) { md = p; -if (!(md->attribute &EFI_MEMORY_RUNTIME ) && - md->type !=EFI_BOOT_SERVICES_CODE && - md->type !=EFI_BOOT_SERVICES_DATA ) -continue ; +if (!(md->attribute &EFI_MEMORY_RUNTIME )) { +#ifdef CONFIG_X86_64 +if (md->type !=EFI_BOOT_SERVICES_CODE && + md->type != EFI_BOOT_SERVICES_DATA) +#endif +continue ; + } size = md->num_pages <<EFI_PAGE_SHIFT ; end = md->phys_addr + size;
drivers/gpu/drm/i915/intel_dp.c +12 -1
@@ -625,7 +625,18 @@ intel_dp_i2c_aux_ch(struct i2c_adapter *adapter, int mode,DRM_DEBUG_KMS ("aux_ch native nack\n" );return -EREMOTEIO ;case AUX_NATIVE_REPLY_DEFER : -udelay (100 ); +/* +* For now, just give more slack to branch devices. We +* could check the DPCD for I2C bit rate capabilities, +* and if available, adjust the interval. We could also +* be more careful with DP-to-Legacy adapters where a +* long legacy cable may force very low I2C bit rates. +*/ +if (intel_dp->dpcd[DP_DOWNSTREAMPORT_PRESENT ] & +DP_DWN_STRM_PORT_PRESENT ) +usleep_range (500 ,600 ); +else +usleep_range (300 ,400 );continue ;default : DRM_ERROR("aux_ch invalid native reply 0x%02x\n",
drivers/gpu/drm/radeon/radeon_device.c +12 -3
@@ -835,13 +835,22 @@ int radeon_device_init(struct radeon_device *rdev,return r; }if ((radeon_testing &1 )) { -radeon_test_moves (rdev); +if (rdev->accel_working) +radeon_test_moves (rdev); +else +DRM_INFO ("radeon: acceleration disabled, skipping move tests\n" ); }if ((radeon_testing &2 )) { -radeon_test_syncing (rdev); +if (rdev->accel_working) +radeon_test_syncing (rdev); +else +DRM_INFO ("radeon: acceleration disabled, skipping sync tests\n" ); }if (radeon_benchmarking) { -radeon_benchmark (rdev, radeon_benchmarking); +if (rdev->accel_working) +radeon_benchmark (rdev, radeon_benchmarking); +else +DRM_INFO ("radeon: acceleration disabled, skipping benchmarks\n" ); }return 0 ; }
drivers/hid/hid-lg2ff.c +3 -16
@@ -66,26 +66,13 @@ int lg2ff_init(struct hid_device *hid)struct hid_report *report;struct hid_input *hidinput =list_entry (hid->inputs.next, struct hid_input, list); -struct list_head *report_list = - &hid->report_enum[HID_OUTPUT_REPORT ].report_list;struct input_dev *dev = hidinput->input;int error; -if (list_empty (report_list)) { -hid_err (hid,"no output report found\n" ); +/* Check that the report looks ok */ + report =hid_validate_values (hid,HID_OUTPUT_REPORT ,0 ,0 ,7 ); +if (!report)return -ENODEV ; - } - - report = list_entry(report_list->next, struct hid_report, list); - -if (report->maxfield <1 ) { -hid_err (hid,"output report is empty\n" ); -return -ENODEV ; - } -if (report->field[0 ]->report_count <7 ) { -hid_err (hid,"not enough values in the field\n" ); -return -ENODEV ; - } lg2ff =kmalloc (sizeof (struct lg2ff_device ),GFP_KERNEL );if (!lg2ff)
drivers/hid/hid-lg3ff.c +6 -23
@@ -68,10 +68,11 @@ static int hid_lg3ff_play(struct input_dev *dev, void *data,int x, y;/* -* Maxusage should always be 63 (maximum fields) -* likely a better way to ensure this data is clean +* Available values in the field should always be 63, but we only use up to +* 35. Instead, clear the entire area, however big it is. */ -memset (report->field[0 ]->value,0 ,sizeof (__s32)*report->field[0 ]->maxusage); +memset (report->field[0 ]->value,0 , +sizeof (__s32) * report->field[0 ]->report_count);switch (effect->type) {case FF_CONSTANT :
@@ -131,32 +132,14 @@ static const signed short ff3_joystick_ac[] = {int lg3ff_init (struct hid_device *hid) { struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); -struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT ].report_list;struct input_dev *dev = hidinput->input; -struct hid_report *report; -struct hid_field *field;const signed short *ff_bits = ff3_joystick_ac;int error;int i; -/* Find the report to use */ -if (list_empty (report_list)) { -hid_err (hid,"No output report found\n" ); -return -1 ; - } -/* Check that the report looks ok */ - report = list_entry(report_list->next, struct hid_report, list); -if (!report) { -hid_err (hid,"NULL output report\n" ); -return -1 ; - } - - field = report->field[0 ]; -if (!field) { -hid_err (hid,"NULL field\n" ); -return -1 ; - } +if (!hid_validate_values (hid,HID_OUTPUT_REPORT ,0 ,0 ,35 )) +return -ENODEV ;/* Assume single fixed device G940 */ for (i =0 ; ff_bits[i] >=0 ; i++)
drivers/hid/hid-lg4ff.c +1 -19
@@ -339,33 +339,15 @@ static ssize_t lg4ff_range_store(struct device *dev, struct device_attribute *atint lg4ff_init (struct hid_device *hid) { struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); -struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT ].report_list;struct input_dev *dev = hidinput->input; -struct hid_report *report; -struct hid_field *field;struct lg4ff_device_entry *entry;struct usb_device_descriptor *udesc;int error, i, j;__u16 bcdDevice, rev_maj, rev_min; -/* Find the report to use */ -if (list_empty (report_list)) { -hid_err (hid,"No output report found\n" ); -return -1 ; - } -/* Check that the report looks ok */ - report = list_entry(report_list->next, struct hid_report, list); -if (!report) { -hid_err (hid,"NULL output report\n" ); +if (!hid_validate_values (hid,HID_OUTPUT_REPORT ,0 ,0 ,7 ))return -1 ; - } - - field = report->field[0 ]; -if (!field) { -hid_err (hid,"NULL field\n" ); -return -1 ; - }/* Check what wheel has been connected */ for (i =0 ; i <ARRAY_SIZE (lg4ff_devices); i++) {
drivers/hid/hid-lgff.c +2 -15
@@ -130,27 +130,14 @@ static void hid_lgff_set_autocenter(struct input_dev *dev, u16 magnitude)int lgff_init (struct hid_device * hid) { struct hid_input *hidinput = list_entry(hid->inputs.next, struct hid_input, list); -struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT ].report_list;struct input_dev *dev = hidinput->input; -struct hid_report *report; -struct hid_field *field;const signed short *ff_bits = ff_joystick;int error;int i; -/* Find the report to use */ -if (list_empty (report_list)) { -hid_err (hid,"No output report found\n" ); -return -1 ; - } -/* Check that the report looks ok */ - report = list_entry(report_list->next, struct hid_report, list); - field = report->field[0 ]; -if (!field) { -hid_err (hid,"NULL field\n" ); -return -1 ; - } +if (!hid_validate_values (hid,HID_OUTPUT_REPORT ,0 ,0 ,7 )) +return -ENODEV ;for (i =0 ; i <ARRAY_SIZE (devices); i++) { if (dev->id.vendor == devices[i].idVendor &&
drivers/hwmon/applesmc.c +10 -1
@@ -489,16 +489,25 @@ static int applesmc_init_smcreg_try(void) {struct applesmc_registers *s = &smcreg;bool left_light_sensor, right_light_sensor; +unsigned int count;u8 tmp[1 ];int ret;if (s->init_complete)return 0 ; - ret =read_register_count (&s->key_count); + ret =read_register_count (&count);if (ret)return ret; +if (s->cache && s->key_count != count) { +pr_warn ("key count changed from %d to %d\n" , + s->key_count, count); +kfree (s->cache); + s->cache =NULL ; + } + s->key_count = count; +if (!s->cache) s->cache =kcalloc (s->key_count,sizeof (*s->cache),GFP_KERNEL );if (!s->cache)
drivers/md/dm-snap-persistent.c +1 -1
@@ -256,7 +256,7 @@ static int chunk_io(struct pstore *ps, void *area, chunk_t chunk, int rw,*/ INIT_WORK_ONSTACK (&req.work, do_metadata);queue_work (ps->metadata_wq, &req.work); -flush_work (&req.work); +flush_workqueue (ps->metadata_wq);return req.result; }
drivers/md/dm-snap.c +2 -3
@@ -721,17 +721,16 @@ static int calc_max_buckets(void)*/ static int init_hash_tables (struct dm_snapshot *s) { -sector_t hash_size, cow_dev_size, origin_dev_size, max_buckets; +sector_t hash_size, cow_dev_size, max_buckets;/* * Calculate based on the size of the original volume or * the COW volume... */ cow_dev_size =get_dev_size (s->cow->bdev); - origin_dev_size =get_dev_size (s->origin->bdev); max_buckets =calc_max_buckets (); - hash_size =min (origin_dev_size, cow_dev_size) >> s->store->chunk_shift; + hash_size = cow_dev_size >> s->store->chunk_shift; hash_size =min (hash_size, max_buckets);if (hash_size <64 )
drivers/staging/vt6656/main_usb.c +2 -1
@@ -1220,6 +1220,8 @@ device_release_WPADEV(pDevice);memset (pMgmt->abyCurrBSSID,0 ,6 ); pMgmt->eCurrState =WMAC_STATE_IDLE ; + pDevice->flags &= ~DEVICE_FLAGS_OPENED ; +device_free_tx_bufs (pDevice);device_free_rx_bufs (pDevice);device_free_int_bufs (pDevice);
@@ -1231,7 +1233,6 @@ device_release_WPADEV(pDevice);usb_free_urb (pDevice->pInterruptURB);BSSvClearNodeDBTable (pDevice,0 ); - pDevice->flags &=(~DEVICE_FLAGS_OPENED );DBG_PRT (MSG_LEVEL_DEBUG ,KERN_INFO "device_close2 \n" );
drivers/usb/core/devio.c +16 -0
@@ -684,6 +684,22 @@ static int check_ctrlrecip(struct dev_state *ps, unsigned int requesttype,if ((index & ~USB_DIR_IN ) ==0 )return 0 ; ret =findintfep (ps->dev, index); +if (ret <0 ) { +/* +* Some not fully compliant Win apps seem to get +* index wrong and have the endpoint number here +* rather than the endpoint address (with the +* correct direction). Win does let this through, +* so we'll not reject it here but leave it to +* the device to not break KVM. But we warn. +*/ + ret =findintfep (ps->dev, index ^0x80 ); +if (ret >=0 ) +dev_info (&ps->dev->dev, +"%s: process %i (%s) requesting ep %02x but needs %02x\n" , + __func__,task_pid_nr (current), + current->comm, index, index ^0x80 ); + }if (ret >=0 ) ret =checkintf (ps, ret);break ;
drivers/usb/host/xhci-hub.c +1 -1
@@ -287,7 +287,7 @@ static int xhci_stop_device(struct xhci_hcd *xhci, int slot_id, int suspend)if (virt_dev->eps[i].ring && virt_dev->eps[i].ring->dequeue)xhci_queue_stop_endpoint (xhci, slot_id, i, suspend); } - cmd->command_trb = xhci->cmd_ring->enqueue; + cmd->command_trb =xhci_find_next_enqueue (xhci->cmd_ring);list_add_tail (&cmd->cmd_list, &virt_dev->cmd_list);xhci_queue_stop_endpoint (xhci, slot_id,0 , suspend);xhci_ring_cmd_db (xhci);
drivers/usb/host/xhci-ring.c +22 -2
@@ -122,6 +122,16 @@ static int enqueue_is_link_trb(struct xhci_ring *ring)return TRB_TYPE_LINK_LE32 (link->control); } +union xhci_trb *xhci_find_next_enqueue (struct xhci_ring *ring) +{ +/* Enqueue pointer can be left pointing to the link TRB, +* we must handle that +*/ +if (TRB_TYPE_LINK_LE32 (ring->enqueue->link.control)) +return ring->enq_seg->next->trbs; +return ring->enqueue; +} +/* Updates trb to point to the next TRB in the ring, and updates seg if the next * TRB is in a new segment. This does not skip over link TRBs, and it does not * effect the ring dequeue or enqueue pointers.
@@ -847,8 +857,12 @@ remove_finished_td:/* Otherwise ring the doorbell(s) to restart queued transfers */ ring_doorbell_for_active_rings (xhci, slot_id, ep_index); } - ep->stopped_td =NULL ; - ep->stopped_trb =NULL ; + +/* Clear stopped_td and stopped_trb if endpoint is not halted */ +if (!(ep->ep_state &EP_HALTED )) { + ep->stopped_td =NULL ; + ep->stopped_trb =NULL ; + }/* * Drop the lock and complete the URBs in the cancelled TD list.
@@ -1390,6 +1404,12 @@ static void handle_cmd_completion(struct xhci_hcd *xhci,inc_deq (xhci, xhci->cmd_ring);return ; } +/* There is no command to handle if we get a stop event when the +* command ring is empty, event->cmd_trb points to the next +* unset command +*/ +if (xhci->cmd_ring->dequeue == xhci->cmd_ring->enqueue) +return ; } switch (le32_to_cpu(xhci->cmd_ring->dequeue->generic.field[3])
drivers/usb/host/xhci.c +5 -20
@@ -2582,15 +2582,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci,if (command) { cmd_completion = command->completion; cmd_status = &command->status; - command->command_trb = xhci->cmd_ring->enqueue; - -/* Enqueue pointer can be left pointing to the link TRB, -* we must handle that -*/ -if (TRB_TYPE_LINK_LE32 (command->command_trb->link.control)) - command->command_trb = - xhci->cmd_ring->enq_seg->next->trbs; - + command->command_trb =xhci_find_next_enqueue (xhci->cmd_ring);list_add_tail (&command->cmd_list, &virt_dev->cmd_list); }else { cmd_completion = &virt_dev->cmd_completion;
@@ -2598,7 +2590,7 @@ static int xhci_configure_endpoint(struct xhci_hcd *xhci, }init_completion (cmd_completion); - cmd_trb = xhci->cmd_ring->dequeue; + cmd_trb =xhci_find_next_enqueue (xhci->cmd_ring);if (!ctx_change) ret =xhci_queue_configure_endpoint (xhci, in_ctx->dma, udev->slot_id, must_succeed);
@@ -3383,14 +3375,7 @@ int xhci_discover_or_reset_device(struct usb_hcd *hcd, struct usb_device *udev)/* Attempt to submit the Reset Device command to the command ring */ spin_lock_irqsave (&xhci->lock, flags); - reset_device_cmd->command_trb = xhci->cmd_ring->enqueue; - -/* Enqueue pointer can be left pointing to the link TRB, -* we must handle that -*/ -if (TRB_TYPE_LINK_LE32 (reset_device_cmd->command_trb->link.control)) - reset_device_cmd->command_trb = - xhci->cmd_ring->enq_seg->next->trbs; + reset_device_cmd->command_trb =xhci_find_next_enqueue (xhci->cmd_ring);list_add_tail (&reset_device_cmd->cmd_list, &virt_dev->cmd_list); ret =xhci_queue_reset_device (xhci, slot_id);
@@ -3594,7 +3579,7 @@ int xhci_alloc_dev(struct usb_hcd *hcd, struct usb_device *udev)union xhci_trb *cmd_trb;spin_lock_irqsave (&xhci->lock, flags); - cmd_trb = xhci->cmd_ring->dequeue; + cmd_trb =xhci_find_next_enqueue (xhci->cmd_ring); ret =xhci_queue_slot_control (xhci,TRB_ENABLE_SLOT ,0 );if (ret) {spin_unlock_irqrestore (&xhci->lock, flags);
@@ -3721,7 +3706,7 @@ int xhci_address_device(struct usb_hcd *hcd, struct usb_device *udev)xhci_dbg_ctx (xhci, virt_dev->in_ctx,2 );spin_lock_irqsave (&xhci->lock, flags); - cmd_trb = xhci->cmd_ring->dequeue; + cmd_trb =xhci_find_next_enqueue (xhci->cmd_ring); ret =xhci_queue_address_device (xhci, virt_dev->in_ctx->dma, udev->slot_id);if (ret) {
drivers/usb/host/xhci.h +1 -0
@@ -1811,6 +1811,7 @@ int xhci_cancel_cmd(struct xhci_hcd *xhci, struct xhci_command *command, union xhci_trb *cmd_trb);void xhci_ring_ep_doorbell (struct xhci_hcd *xhci,unsigned int slot_id,unsigned int ep_index,unsigned int stream_id); +union xhci_trb *xhci_find_next_enqueue (struct xhci_ring *ring);/* xHCI roothub code */ void xhci_set_link_state(struct xhci_hcd *xhci, __le32 __iomem **port_array,
mm/oom_kill.c +4 -4
@@ -562,11 +562,11 @@ void mem_cgroup_out_of_memory(struct mem_cgroup *memcg, gfp_t gfp_mask,struct task_struct *p;/* -* If current has a pending SIGKILL, then automatically select it. The -* goal is to allow it to allocate so that it may quickly exit and free -* its memory. +* If current has a pending SIGKILL or is exiting, then automatically +* select it. The goal is to allow it to allocate so that it may +* quickly exit and free its memory. */ -if (fatal_signal_pending (current)) { +if (fatal_signal_pending (current) || current->flags &PF_EXITING ) {set_thread_flag (TIF_MEMDIE );return ; }
sound/core/compress_offload.c +2 -1
@@ -663,7 +663,8 @@ static int snd_compress_dev_disconnect(struct snd_device *device)struct snd_compr *compr; compr = device->device_data; -snd_unregister_device (compr->direction, compr->card, compr->device); +snd_unregister_device (SNDRV_DEVICE_TYPE_COMPRESS , compr->card, + compr->device);return 0 ; }