Linux 3.0.62
Greg KH
maintainerI'm announcing the release of the 3.0.62 kernel.
All users of the 3.0 kernel series must upgrade.
The updated 3.0.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.0.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/mm/dma-mapping.c | 18 ++++++++++-------- arch/x86/kernel/msr.c | 3 +++ arch/x86/kernel/setup.c | 2 ++ arch/x86/platform/efi/efi_64.c | 22 +++++++++++++++++----- drivers/edac/edac_pci_sysfs.c | 2 +- drivers/net/can/c_can/c_can.c | 4 ++-- drivers/net/can/pch_can.c | 2 +- drivers/net/can/ti_hecc.c | 4 ++-- drivers/net/wireless/ath/ath9k/beacon.c | 1 + drivers/net/wireless/ath/ath9k/htc_hst.c | 2 ++ fs/cifs/cifs_dfs_ref.c | 2 ++ kernel/smp.c | 13 ++++++++++++- net/bluetooth/hci_event.c | 2 +- net/bluetooth/hidp/core.c | 2 +- sound/usb/mixer.c | 17 ++++++++++++----- 16 files changed, 70 insertions(+), 28 deletions(-)
Alan Cox (1):
x86/msr: Add capabilities check
Anderson Lizardo (1):
Bluetooth: Fix incorrect strncpy() in hidp_setup_hid()
Clemens Ladisch (1):
ALSA: usb-audio: fix invalid length check for RME and other UAC 2 devices
Cong Ding (1):
fs/cifs/cifs_dfs_ref.c: fix potential memory leakage
Dan Carpenter (1):
EDAC: Test correct variable in ->store function
Felix Fietkau (1):
ath9k: fix double-free bug on beacon generate failure
Greg Kroah-Hartman (1):
Linux 3.0.62
H. Peter Anvin (1):
x86/Sandy Bridge: Sandy Bridge workaround depends on CONFIG_PCI
Nathan Zimmer (1):
efi, x86: Pass a proper identity mapping in efi_call_phys_prelog
Olivier Sobrie (3):
can: c_can: fix invalid error codes
can: ti_hecc: fix invalid error codes
can: pch_can: fix invalid error codes
Russell King (1):
ARM: DMA: Fix struct page iterator in dma_cache_maint() to work with sparsemem
Sujith Manoharan (1):
ath9k_htc: Fix memory leak
Szymon Janc (1):
Bluetooth: Fix sending HCI commands after reset
Wang YanQing (1):
smp: Fix SMP function call empty cpu mask race
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 0 -SUBLEVEL = 61 +SUBLEVEL = 62 EXTRAVERSION = NAME = Sneaky Weasel
arch/arm/mm/dma-mapping.c +10 -8
@@ -467,25 +467,27 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset, size_t size, enum dma_data_direction dir, void (*op)(const void *, size_t, int)) { + unsigned long pfn; +size_t left = size; + + pfn =page_to_pfn (page) + offset /PAGE_SIZE ; + offset %=PAGE_SIZE ; +/* * A single sg entry may refer to multiple physically contiguous * pages. But we still need to process highmem pages individually. * If highmem is not configured then the bulk of this loop gets * optimized out. */ -size_t left = size; do { size_t len = left; void *vaddr; + page = pfn_to_page(pfn); + if (PageHighMem(page)) { - if (len + offset > PAGE_SIZE) { - if (offset >= PAGE_SIZE) { - page += offset / PAGE_SIZE; - offset %= PAGE_SIZE; - } + if (len + offset > PAGE_SIZE) len = PAGE_SIZE - offset; - } vaddr = kmap_high_get(page); if (vaddr) { vaddr += offset;
@@ -502,7 +504,7 @@ static void dma_cache_maint_page(struct page *page, unsigned long offset,op (vaddr, len, dir); } offset =0 ; - page++; + pfn++; left -= len; }while (left); }
arch/x86/kernel/msr.c +3 -0
@@ -175,6 +175,9 @@ static int msr_open(struct inode *inode, struct file *file)unsigned int cpu;struct cpuinfo_x86 *c; +if (!capable (CAP_SYS_RAWIO )) +return -EPERM ; + cpu =iminor (file->f_path.dentry->d_inode);if (cpu >= nr_cpu_ids || !cpu_online (cpu))return -ENXIO ;/* No such CPU */
arch/x86/kernel/setup.c +2 -0
@@ -633,6 +633,7 @@ static unsigned reserve_low = CONFIG_X86_RESERVE_LOW << 10;static bool __init snb_gfx_workaround_needed (void ) { +#ifdef CONFIG_PCI int i;u16 vendor, devid; static const u16 snb_ids[] = {
@@ -657,6 +658,7 @@ static bool __init snb_gfx_workaround_needed(void)for (i =0 ; i <ARRAY_SIZE (snb_ids); i++)if (devid == snb_ids[i])return true; +#endif return false; }
arch/x86/platform/efi/efi_64.c +17 -5
@@ -38,7 +38,7 @@#include <asm/cacheflush.h> #include <asm/fixmap.h> -static pgd_t save_pgd__initdata ; +static pgd_t *save_pgd__initdata ;static unsigned long efi_flags__initdata ;static void __init early_code_mapping_set_exec (int executable)
@@ -61,12 +61,20 @@ static void __init early_code_mapping_set_exec(int executable)void __init efi_call_phys_prelog (void ) {unsigned long vaddress; +int pgd; +int n_pgds;early_code_mapping_set_exec (1 );local_irq_save (efi_flags); - vaddress = (unsigned long )__va (0x0UL ); - save_pgd = *pgd_offset_k (0x0UL ); -set_pgd (pgd_offset_k (0x0UL ), *pgd_offset_k (vaddress)); + + n_pgds =DIV_ROUND_UP ((max_pfn <<PAGE_SHIFT ),PGDIR_SIZE ); + save_pgd =kmalloc (n_pgds *sizeof (pgd_t),GFP_KERNEL ); + +for (pgd =0 ; pgd < n_pgds; pgd++) { + save_pgd[pgd] = *pgd_offset_k (pgd *PGDIR_SIZE ); + vaddress = (unsigned long )__va (pgd *PGDIR_SIZE ); +set_pgd (pgd_offset_k (pgd *PGDIR_SIZE ), *pgd_offset_k (vaddress)); + }__flush_tlb_all (); }
@@ -75,7 +83,11 @@ void __init efi_call_phys_epilog(void)/* * After the lock is released, the original page table is restored. */ -set_pgd (pgd_offset_k (0x0UL ), save_pgd); +int pgd; +int n_pgds =DIV_ROUND_UP ((max_pfn <<PAGE_SHIFT ) ,PGDIR_SIZE ); +for (pgd =0 ; pgd < n_pgds; pgd++) +set_pgd (pgd_offset_k (pgd *PGDIR_SIZE ), save_pgd[pgd]); +kfree (save_pgd);__flush_tlb_all ();local_irq_restore (efi_flags);early_code_mapping_set_exec (0 );
drivers/edac/edac_pci_sysfs.c +1 -1
@@ -257,7 +257,7 @@ static ssize_t edac_pci_dev_store(struct kobject *kobj,struct edac_pci_dev_attribute *edac_pci_dev; edac_pci_dev = (struct edac_pci_dev_attribute *)attr; -if (edac_pci_dev->show) +if (edac_pci_dev->store)return edac_pci_dev->store (edac_pci_dev->value, buffer, count);return -EIO ; }
drivers/net/can/c_can/c_can.c +2 -2
@@ -916,7 +916,7 @@ static int c_can_handle_bus_err(struct net_device *dev,break ;case LEC_ACK_ERROR :netdev_dbg (dev,"ack error\n" ); - cf->data[2 ] |= (CAN_ERR_PROT_LOC_ACK | + cf->data[3 ] |= (CAN_ERR_PROT_LOC_ACK |CAN_ERR_PROT_LOC_ACK_DEL );break ;case LEC_BIT1_ERROR :
@@ -929,7 +929,7 @@ static int c_can_handle_bus_err(struct net_device *dev,break ;case LEC_CRC_ERROR :netdev_dbg (dev,"CRC error\n" ); - cf->data[2 ] |= (CAN_ERR_PROT_LOC_CRC_SEQ | + cf->data[3 ] |= (CAN_ERR_PROT_LOC_CRC_SEQ |CAN_ERR_PROT_LOC_CRC_DEL );break ;default :
drivers/net/can/pch_can.c +1 -1
@@ -559,7 +559,7 @@ static void pch_can_error(struct net_device *ndev, u32 status) stats->rx_errors++;break ;case PCH_CRC_ERR : - cf->data[2 ] |=CAN_ERR_PROT_LOC_CRC_SEQ | + cf->data[3 ] |=CAN_ERR_PROT_LOC_CRC_SEQ |CAN_ERR_PROT_LOC_CRC_DEL ; priv->can.can_stats.bus_error++; stats->rx_errors++;
drivers/net/can/ti_hecc.c +2 -2
@@ -734,12 +734,12 @@ static int ti_hecc_error(struct net_device *ndev, int int_status, }if (err_status &HECC_CANES_CRCE ) {hecc_set_bit (priv,HECC_CANES ,HECC_CANES_CRCE ); - cf->data[2 ] |=CAN_ERR_PROT_LOC_CRC_SEQ | + cf->data[3 ] |=CAN_ERR_PROT_LOC_CRC_SEQ |CAN_ERR_PROT_LOC_CRC_DEL ; }if (err_status &HECC_CANES_ACKE ) {hecc_set_bit (priv,HECC_CANES ,HECC_CANES_ACKE ); - cf->data[2 ] |=CAN_ERR_PROT_LOC_ACK | + cf->data[3 ] |=CAN_ERR_PROT_LOC_ACK |CAN_ERR_PROT_LOC_ACK_DEL ; } }
drivers/net/wireless/ath/ath9k/beacon.c +1 -0
@@ -159,6 +159,7 @@ static struct ath_buf *ath_beacon_generate(struct ieee80211_hw *hw, skb->len, DMA_TO_DEVICE);dev_kfree_skb_any (skb); bf->bf_buf_addr =0 ; + bf->bf_mpdu =NULL ; }/* Get a new beacon from mac80211 */
drivers/net/wireless/ath/ath9k/htc_hst.c +2 -0
@@ -342,6 +342,8 @@ void ath9k_htc_txcompletion_cb(struct htc_target *htc_handle, endpoint->ep_callbacks.tx (endpoint->ep_callbacks.priv, skb, htc_hdr->endpoint_id, txok); + }else { +kfree_skb (skb); } }
fs/cifs/cifs_dfs_ref.c +2 -0
@@ -225,6 +225,8 @@ compose_mount_options_out: compose_mount_options_err:kfree (mountdata); mountdata =ERR_PTR (rc); +kfree (*devname); + *devname =NULL ; goto compose_mount_options_out; }
kernel/smp.c +12 -1
@@ -31,6 +31,7 @@ struct call_function_data {struct call_single_data csd;atomic_t refs;cpumask_var_t cpumask; +cpumask_var_t cpumask_ipi; }; static DEFINE_PER_CPU_SHARED_ALIGNED(struct call_function_data, cfd_data);
@@ -54,6 +55,9 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)if (!zalloc_cpumask_var_node (&cfd->cpumask,GFP_KERNEL ,cpu_to_node (cpu)))return notifier_from_errno (-ENOMEM ); +if (!zalloc_cpumask_var_node (&cfd->cpumask_ipi,GFP_KERNEL , +cpu_to_node (cpu))) +return notifier_from_errno (-ENOMEM );break ;#ifdef CONFIG_HOTPLUG_CPU
@@ -63,6 +67,7 @@ hotplug_cfd(struct notifier_block *nfb, unsigned long action, void *hcpu)case CPU_DEAD :case CPU_DEAD_FROZEN :free_cpumask_var (cfd->cpumask); +free_cpumask_var (cfd->cpumask_ipi);break ;#endif };
@@ -524,6 +529,12 @@ void smp_call_function_many(const struct cpumask *mask,return ; } +/* +* After we put an entry into the list, data->cpumask +* may be cleared again when another CPU sends another IPI for +* a SMP function call, so data->cpumask will be zero. +*/ +cpumask_copy (data->cpumask_ipi, data->cpumask);raw_spin_lock_irqsave (&call_function.lock, flags);/* * Place entry at the _HEAD_ of the list, so that any cpu still
@@ -547,7 +558,7 @@ void smp_call_function_many(const struct cpumask *mask,smp_mb ();/* Send a message to all CPUs in the map */ -arch_send_call_function_ipi_mask (data->cpumask); +arch_send_call_function_ipi_mask (data->cpumask_ipi);/* Optionally wait for the CPUs to complete */ if (wait)
net/bluetooth/hci_event.c +1 -1
@@ -1823,7 +1823,7 @@ static inline void hci_cmd_complete_evt(struct hci_dev *hdev, struct sk_buff *skif (ev->opcode !=HCI_OP_NOP )del_timer (&hdev->cmd_timer); -if (ev->ncmd) { +if (ev->ncmd && !test_bit (HCI_RESET , &hdev->flags)) {atomic_set (&hdev->cmd_cnt,1 );if (!skb_queue_empty (&hdev->cmd_q))tasklet_schedule (&hdev->cmd_task);
net/bluetooth/hidp/core.c +1 -1
@@ -934,7 +934,7 @@ static int hidp_setup_hid(struct hidp_session *session, hid->version = req->version; hid->country = req->country; -strncpy (hid->name, req->name,128 ); +strncpy (hid->name, req->name,sizeof (req->name) -1 );strncpy (hid->phys,batostr (&bt_sk (session->ctrl_sock->sk)->src),64 );strncpy (hid->uniq,batostr (&bt_sk (session->ctrl_sock->sk)->dst),64 );
sound/usb/mixer.c +12 -5
@@ -1238,16 +1238,23 @@ static int parse_audio_feature_unit(struct mixer_build *state, int unitid, void } channels = (hdr->bLength -7 ) / csize -1 ; bmaControls = hdr->bmaControls; +if (hdr->bLength <7 + csize) { +snd_printk (KERN_ERR "usbaudio: unit %u: " +"invalid UAC_FEATURE_UNIT descriptor\n" , + unitid); +return -EINVAL ; + } }else {struct uac2_feature_unit_descriptor *ftr = _ftr; csize =4 ; channels = (hdr->bLength -6 ) /4 -1 ; bmaControls = ftr->bmaControls; - } - -if (hdr->bLength <7 || !csize || hdr->bLength <7 + csize) { -snd_printk (KERN_ERR "usbaudio: unit %u: invalid UAC_FEATURE_UNIT descriptor\n" , unitid); -return -EINVAL ; +if (hdr->bLength <6 + csize) { +snd_printk (KERN_ERR "usbaudio: unit %u: " +"invalid UAC_FEATURE_UNIT descriptor\n" , + unitid); +return -EINVAL ; + } }/* parse the source unit */