Linux 3.4.36
Greg KH
maintainerI'm announcing the release of the 3.4.36 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/kernel/perf_event_v7.c | 2 arch/arm/mm/alignment.c | 11 - arch/arm/vfp/vfpmodule.c | 2 arch/x86/pci/xen.c | 9 + arch/x86/xen/enlighten.c | 10 + crypto/ablkcipher.c | 12 - crypto/aead.c | 9 - crypto/ahash.c | 2 crypto/blkcipher.c | 6 crypto/crypto_user.c | 22 +-- crypto/pcompress.c | 3 crypto/rng.c | 2 crypto/shash.c | 3 drivers/ata/ata_piix.c | 25 +++- drivers/char/hw_random/core.c | 19 ++- drivers/cpufreq/cpufreq_stats.c | 1 drivers/firmware/dmi_scan.c | 5 drivers/gpu/drm/radeon/radeon_combios.c | 9 + drivers/hid/hid-logitech-dj.c | 22 ++- drivers/hwmon/pmbus/ltc2978.c | 30 ++-- drivers/hwmon/sht15.c | 8 + drivers/md/md.c | 7 + drivers/md/raid0.c | 5 drivers/net/ethernet/intel/e1000e/netdev.c | 2 drivers/net/wireless/ath/ath9k/common.h | 2 drivers/net/wireless/ath/ath9k/hw.c | 4 drivers/net/wireless/mwifiex/pcie.c | 2 drivers/scsi/dc395x.c | 2 drivers/scsi/storvsc_drv.c | 1 drivers/target/target_core_pscsi.c | 1 drivers/usb/core/hub.c | 178 +++++++++++++++-------------- fs/btrfs/volumes.c | 1 fs/cifs/cifsfs.c | 5 fs/compat.c | 15 +- fs/nfs/unlink.c | 20 ++- fs/pipe.c | 3 kernel/trace/Kconfig | 24 ++- mm/process_vm_access.c | 8 - net/sunrpc/xprt.c | 6 security/keys/compat.c | 4 security/keys/process_keys.c | 2 sound/core/vmaster.c | 5 sound/pci/hda/patch_hdmi.c | 3 sound/pci/ice1712/ice1712.c | 2 45 files changed, 310 insertions(+), 206 deletions(-)
Al Viro (1):
vfs: fix pipe counter breakage
Alex Deucher (1):
drm/radeon: add primary dac adj quirk for R200 board
Asias He (1):
target/pscsi: Fix page increment
Avinash Patil (1):
mwifiex: correct sleep delay counter
Ben Hutchings (1):
dmi_scan: fix missing check for _DMI_ signature in smbios_present()
Benjamin Tissoires (1):
HID: logitech-dj: do not directly call hid_output_raw_report() during probe
Dan Carpenter (1):
SCSI: dc395x: uninitialized variable in device_alloc()
David Howells (1):
keys: fix race with concurrent install_user_keyrings()
Felix Fietkau (2):
ath9k: fix RSSI dummy marker value
ath9k_hw: improve reset reliability after errors
Greg Kroah-Hartman (2):
Revert "ALSA: hda - hdmi: Make jacks phantom, if they're not detectable" Linux 3.4.36
Guenter Roeck (2):
hwmon: (pmbus/ltc2978) Fix peak attribute handling
hwmon: (pmbus/ltc2978) Use detected chip ID to select supported functionality
Jeff Layton (1):
cifs: ensure that cifs_get_root() only traverses directories
K. Y. Srinivasan (1):
SCSI: storvsc: Initialize the sglist
Konrad Rzeszutek Wilk (2):
xen/pci: We don't do multiple MSI's. xen/pat: Disable PAT using pat_enabled value.
Konstantin Khlebnikov (1):
e1000e: fix pci-device enable-counter balance
Mark Brown (1):
hwmon: (sht15) Check return value of regulator_enable()
Mathias Krause (1):
crypto: user - fix info leaks in report API
Mathieu Desnoyers (1):
Fix: compat_rw_copy_check_uvector() misuse in aio, readv, writev, and security keys
NeilBrown (2):
md: fix two bugs when attempting to resize RAID0 array.
md: raid0: fix error return from create_stripe_zones.
Olaf Hering (1):
ata_piix: reenable MS Virtual PC guests
Russell King (2):
ARM: VFP: fix emulation of second VFP instruction
ARM: fix scheduling while atomic warning in alignment handling code
Rusty Russell (1):
hw_random: make buffer usable in scatterlist.
Sarah Sharp (4):
USB: Don't use EHCI port sempahore for USB 3.0 hubs.
USB: Prepare for refactoring by adding extra udev checks.
USB: Rip out recursive call on warm port reset.
USB: Fix connected device switch to Inactive state.
Sean Connor (1):
ALSA: ice1712: Initialize card->private_data properly
Sebastian Riemer (1):
md: protect against crash upon fsync on ro array
Steven Rostedt (1):
ftrace: Update the kconfig for DYNAMIC_FTRACE
Takashi Iwai (1):
ALSA: vmaster: Fix slave change notification
Thomas Gleixner (1):
btrfs: Init io_lock after cloning btrfs device struct
Trond Myklebust (2):
NFS: Don't allow NFS silly-renamed files to be deleted, no signal
SUNRPC: Don't start the retransmission timer when out of socket space
Tu, Xiaobing (1):
Fix memory leak in cpufreq stats.
Will Deacon (1):
ARM: 7663/1: perf: fix ARMv7 EVTYPE_MASK to include NSH bit
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 35 +SUBLEVEL = 36 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/kernel/perf_event_v7.c +1 -1
@@ -775,7 +775,7 @@ static const unsigned armv7_a7_perf_cache_map[PERF_COUNT_HW_CACHE_MAX]/* * PMXEVTYPER: Event selection reg */ -#define ARMV7_EVTYPE_MASK 0xc00000ff/* Mask for writable bits */ +#define ARMV7_EVTYPE_MASK 0xc80000ff/* Mask for writable bits */ #define ARMV7_EVTYPE_EVENT 0xff/* Mask for EVENT bits */ /*
arch/arm/mm/alignment.c +4 -7
@@ -750,7 +750,6 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)unsigned long instr =0 , instrptr;int (*handler)(unsigned long addr,unsigned long instr,struct pt_regs *regs);unsigned int type; -mm_segment_t fs;unsigned int fault;u16 tinstr =0 ;int isize =4 ;
@@ -761,16 +760,15 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) instrptr =instruction_pointer (regs); - fs =get_fs (); -set_fs (KERNEL_DS );if (thumb_mode (regs)) { - fault =__get_user (tinstr, (u16 *)(instrptr & ~1 )); +u16 *ptr = (u16 *)(instrptr & ~1 ); + fault =probe_kernel_address (ptr, tinstr);if (!fault) {if (cpu_architecture () >= CPU_ARCH_ARMv7 &&IS_T32 (tinstr)) {/* Thumb-2 32-bit */ u16 tinst2 =0 ; - fault =__get_user (tinst2, (u16 *)(instrptr+2 )); + fault =probe_kernel_address (ptr +1 , tinst2); instr = (tinstr <<16 ) | tinst2; thumb2_32b =1 ; }else {
@@ -779,8 +777,7 @@ do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs) } } }else - fault =__get_user (instr, (u32 *)instrptr); -set_fs (fs); + fault =probe_kernel_address (instrptr, instr);if (fault) { type =TYPE_FAULT ;
arch/arm/vfp/vfpmodule.c +1 -1
@@ -413,7 +413,7 @@ void VFP_bounce(u32 trigger, u32 fpexc, struct pt_regs *regs)* If there isn't a second FP instruction, exit now. Note that * the FPEXC.FP2V bit is valid only if FPEXC.EX is 1. */ -if (fpexc ^ (FPEXC_EX |FPEXC_FP2V )) +if ((fpexc & (FPEXC_EX |FPEXC_FP2V )) != (FPEXC_EX |FPEXC_FP2V )) goto exit;/*
arch/x86/pci/xen.c +9 -0
@@ -162,6 +162,9 @@ static int xen_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)struct msi_desc *msidesc;int *v; +if (type ==PCI_CAP_ID_MSI && nvec >1 ) +return 1 ; + v =kzalloc (sizeof (int ) *max (1 , nvec),GFP_KERNEL );if (!v)return -ENOMEM ;
@@ -220,6 +223,9 @@ static int xen_hvm_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)struct msi_desc *msidesc;struct msi_msg msg; +if (type ==PCI_CAP_ID_MSI && nvec >1 ) +return 1 ; +list_for_each_entry (msidesc, &dev->msi_list, list) {__read_msi_msg (msidesc, &msg); pirq = MSI_ADDR_EXT_DEST_ID(msg.address_hi) |
@@ -263,6 +269,9 @@ static int xen_initdom_setup_msi_irqs(struct pci_dev *dev, int nvec, int type)int ret =0 ;struct msi_desc *msidesc; +if (type ==PCI_CAP_ID_MSI && nvec >1 ) +return 1 ; +list_for_each_entry (msidesc, &dev->msi_list, list) {struct physdev_map_pirq map_irq;domid_t domid;
arch/x86/xen/enlighten.c +9 -1
@@ -64,6 +64,7 @@#include <asm/hypervisor.h> #include <asm/mwait.h> #include <asm/pci_x86.h> +#include <asm/pat.h> #ifdef CONFIG_ACPI #include <linux/acpi.h>
@@ -1355,7 +1356,14 @@ asmlinkage void __init xen_start_kernel(void)*/ acpi_numa =-1 ;#endif - +#ifdef CONFIG_X86_PAT +/* +* For right now disable the PAT. We should remove this once +* git commit 8eaffa67b43e99ae581622c5133e20b0f48bcef1 +* (xen/pat: Disable PAT support for now) is reverted. +*/ + pat_enabled =0 ; +#endif pgd = (pgd_t *)xen_start_info->pt_base;/* Don't do the full vcpu_info placement stuff until we have a
crypto/ablkcipher.c +6 -6
@@ -388,9 +388,9 @@ static int crypto_ablkcipher_report(struct sk_buff *skb, struct crypto_alg *alg) {struct crypto_report_blkcipher rblkcipher; -snprintf (rblkcipher.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"ablkcipher" ); -snprintf (rblkcipher.geniv,CRYPTO_MAX_ALG_NAME ,"%s" , - alg->cra_ablkcipher.geniv ?:"<default>" ); +strncpy (rblkcipher.type,"ablkcipher" ,sizeof (rblkcipher.type)); +strncpy (rblkcipher.geniv, alg->cra_ablkcipher.geniv ?:"<default>" , +sizeof (rblkcipher.geniv)); rblkcipher.blocksize = alg->cra_blocksize; rblkcipher.min_keysize = alg->cra_ablkcipher.min_keysize;
@@ -469,9 +469,9 @@ static int crypto_givcipher_report(struct sk_buff *skb, struct crypto_alg *alg) {struct crypto_report_blkcipher rblkcipher; -snprintf (rblkcipher.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"givcipher" ); -snprintf (rblkcipher.geniv,CRYPTO_MAX_ALG_NAME ,"%s" , - alg->cra_ablkcipher.geniv ?:"<built-in>" ); +strncpy (rblkcipher.type,"givcipher" ,sizeof (rblkcipher.type)); +strncpy (rblkcipher.geniv, alg->cra_ablkcipher.geniv ?:"<built-in>" , +sizeof (rblkcipher.geniv)); rblkcipher.blocksize = alg->cra_blocksize; rblkcipher.min_keysize = alg->cra_ablkcipher.min_keysize;
crypto/aead.c +4 -5
@@ -117,9 +117,8 @@ static int crypto_aead_report(struct sk_buff *skb, struct crypto_alg *alg)struct crypto_report_aead raead;struct aead_alg *aead = &alg->cra_aead; -snprintf (raead.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"aead" ); -snprintf (raead.geniv,CRYPTO_MAX_ALG_NAME ,"%s" , - aead->geniv ?:"<built-in>" ); +strncpy (raead.type,"aead" ,sizeof (raead.type)); +strncpy (raead.geniv, aead->geniv ?:"<built-in>" ,sizeof (raead.geniv)); raead.blocksize = alg->cra_blocksize; raead.maxauthsize = aead->maxauthsize;
@@ -203,8 +202,8 @@ static int crypto_nivaead_report(struct sk_buff *skb, struct crypto_alg *alg)struct crypto_report_aead raead;struct aead_alg *aead = &alg->cra_aead; -snprintf (raead.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"nivaead" ); -snprintf (raead.geniv,CRYPTO_MAX_ALG_NAME ,"%s" , aead->geniv); +strncpy (raead.type,"nivaead" ,sizeof (raead.type)); +strncpy (raead.geniv, aead->geniv,sizeof (raead.geniv)); raead.blocksize = alg->cra_blocksize; raead.maxauthsize = aead->maxauthsize;
crypto/ahash.c +1 -1
@@ -404,7 +404,7 @@ static int crypto_ahash_report(struct sk_buff *skb, struct crypto_alg *alg) {struct crypto_report_hash rhash; -snprintf (rhash.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"ahash" ); +strncpy (rhash.type,"ahash" ,sizeof (rhash.type)); rhash.blocksize = alg->cra_blocksize; rhash.digestsize =__crypto_hash_alg_common (alg)->digestsize;
crypto/blkcipher.c +3 -3
@@ -499,9 +499,9 @@ static int crypto_blkcipher_report(struct sk_buff *skb, struct crypto_alg *alg) {struct crypto_report_blkcipher rblkcipher; -snprintf (rblkcipher.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"blkcipher" ); -snprintf (rblkcipher.geniv,CRYPTO_MAX_ALG_NAME ,"%s" , - alg->cra_blkcipher.geniv ?:"<default>" ); +strncpy (rblkcipher.type,"blkcipher" ,sizeof (rblkcipher.type)); +strncpy (rblkcipher.geniv, alg->cra_blkcipher.geniv ?:"<default>" , +sizeof (rblkcipher.geniv)); rblkcipher.blocksize = alg->cra_blocksize; rblkcipher.min_keysize = alg->cra_blkcipher.min_keysize;
crypto/crypto_user.c +11 -11
@@ -75,7 +75,7 @@ static int crypto_report_cipher(struct sk_buff *skb, struct crypto_alg *alg) {struct crypto_report_cipher rcipher; -snprintf (rcipher.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"cipher" ); +strncpy (rcipher.type,"cipher" ,sizeof (rcipher.type)); rcipher.blocksize = alg->cra_blocksize; rcipher.min_keysize = alg->cra_cipher.cia_min_keysize;
@@ -94,8 +94,7 @@ static int crypto_report_comp(struct sk_buff *skb, struct crypto_alg *alg) {struct crypto_report_comp rcomp; -snprintf (rcomp.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"compression" ); - +strncpy (rcomp.type,"compression" ,sizeof (rcomp.type));NLA_PUT (skb,CRYPTOCFGA_REPORT_COMPRESS ,sizeof (struct crypto_report_comp ), &rcomp);
@@ -108,12 +107,14 @@ nla_put_failure:static int crypto_report_one (struct crypto_alg *alg,struct crypto_user_alg *ualg,struct sk_buff *skb) { -memcpy (&ualg->cru_name, &alg->cra_name,sizeof (ualg->cru_name)); -memcpy (&ualg->cru_driver_name, &alg->cra_driver_name, -sizeof (ualg->cru_driver_name)); -memcpy (&ualg->cru_module_name,module_name (alg->cra_module), -CRYPTO_MAX_ALG_NAME ); - +strncpy (ualg->cru_name, alg->cra_name,sizeof (ualg->cru_name)); +strncpy (ualg->cru_driver_name, alg->cra_driver_name, +sizeof (ualg->cru_driver_name)); +strncpy (ualg->cru_module_name,module_name (alg->cra_module), +sizeof (ualg->cru_module_name)); + + ualg->cru_type =0 ; + ualg->cru_mask =0 ; ualg->cru_flags = alg->cra_flags; ualg->cru_refcnt =atomic_read (&alg->cra_refcnt);
@@ -122,8 +123,7 @@ static int crypto_report_one(struct crypto_alg *alg,if (alg->cra_flags &CRYPTO_ALG_LARVAL ) {struct crypto_report_larval rl; -snprintf (rl.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"larval" ); - +strncpy (rl.type,"larval" ,sizeof (rl.type));NLA_PUT (skb,CRYPTOCFGA_REPORT_LARVAL ,sizeof (struct crypto_report_larval ), &rl);
crypto/pcompress.c +1 -2
@@ -53,8 +53,7 @@ static int crypto_pcomp_report(struct sk_buff *skb, struct crypto_alg *alg) {struct crypto_report_comp rpcomp; -snprintf (rpcomp.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"pcomp" ); - +strncpy (rpcomp.type,"pcomp" ,sizeof (rpcomp.type));NLA_PUT (skb,CRYPTOCFGA_REPORT_COMPRESS ,sizeof (struct crypto_report_comp ), &rpcomp);
crypto/rng.c +1 -1
@@ -65,7 +65,7 @@ static int crypto_rng_report(struct sk_buff *skb, struct crypto_alg *alg) {struct crypto_report_rng rrng; -snprintf (rrng.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"rng" ); +strncpy (rrng.type,"rng" ,sizeof (rrng.type)); rrng.seedsize = alg->cra_rng.seedsize;
crypto/shash.c +2 -1
@@ -530,7 +530,8 @@ static int crypto_shash_report(struct sk_buff *skb, struct crypto_alg *alg)struct crypto_report_hash rhash;struct shash_alg *salg =__crypto_shash_alg (alg); -snprintf (rhash.type,CRYPTO_MAX_ALG_NAME ,"%s" ,"shash" ); +strncpy (rhash.type,"shash" ,sizeof (rhash.type)); + rhash.blocksize = alg->cra_blocksize; rhash.digestsize = salg->digestsize;
drivers/ata/ata_piix.c +22 -3
@@ -1594,12 +1594,31 @@ static void piix_ignore_devices_quirk(struct ata_host *host) }, { }/* terminate list */ }; -const struct dmi_system_id *dmi =dmi_first_match (ignore_hyperv); +static const struct dmi_system_id allow_virtual_pc[] = { + { +/* In MS Virtual PC guests the DMI ident is nearly +* identical to a Hyper-V guest. One difference is the +* product version which is used here to identify +* a Virtual PC guest. This entry allows ata_piix to +* drive the emulated hardware. +*/ + .ident ="MS Virtual PC 2007" , + .matches = { +DMI_MATCH (DMI_SYS_VENDOR , +"Microsoft Corporation" ), +DMI_MATCH (DMI_PRODUCT_NAME ,"Virtual Machine" ), +DMI_MATCH (DMI_PRODUCT_VERSION ,"VS2005R2" ), + }, + }, + { }/* terminate list */ + }; +const struct dmi_system_id *ignore =dmi_first_match (ignore_hyperv); +const struct dmi_system_id *allow =dmi_first_match (allow_virtual_pc); -if (dmi && prefer_ms_hyperv) { +if (ignore && !allow && prefer_ms_hyperv) { host->flags |=ATA_HOST_IGNORE_ATA ;dev_info (host->dev,"%s detected, ATA device ignore set\n" , - dmi->ident); + ignore->ident); }#endif }
drivers/char/hw_random/core.c +16 -3
@@ -40,6 +40,7 @@#include <linux/init.h> #include <linux/miscdevice.h> #include <linux/delay.h> +#include <linux/slab.h> #include <asm/uaccess.h>
@@ -52,8 +53,12 @@ static struct hwrng *current_rng;static LIST_HEAD (rng_list);static DEFINE_MUTEX (rng_mutex);static int data_avail; -static u8 rng_buffer[SMP_CACHE_BYTES < 32 ? 32 : SMP_CACHE_BYTES] - __cacheline_aligned; +static u8 *rng_buffer; + +static size_t rng_buffer_size (void ) +{ +return SMP_CACHE_BYTES <32 ?32 :SMP_CACHE_BYTES ; +}static inline int hwrng_init (struct hwrng *rng) {
@@ -116,7 +121,7 @@ static ssize_t rng_dev_read(struct file *filp, char __user *buf,if (!data_avail) { bytes_read =rng_get_data (current_rng, rng_buffer, -sizeof (rng_buffer), +rng_buffer_size (), !(filp->f_flags &O_NONBLOCK ));if (bytes_read <0 ) { err = bytes_read;
@@ -307,6 +312,14 @@ int hwrng_register(struct hwrng *rng)mutex_lock (&rng_mutex); +/* kmalloc makes this safe for virt_to_page() in virtio_rng.c */ + err = -ENOMEM ; +if (!rng_buffer) { + rng_buffer =kmalloc (rng_buffer_size (),GFP_KERNEL ); +if (!rng_buffer) + goto out_unlock; + } +/* Must not register two RNGs with the same name. */ err = -EEXIST ;list_for_each_entry (tmp, &rng_list, list) {
drivers/cpufreq/cpufreq_stats.c +1 -0
@@ -328,6 +328,7 @@ static int __cpuinit cpufreq_stat_cpu_callback(struct notifier_block *nfb,cpufreq_update_policy (cpu);break ;case CPU_DOWN_PREPARE : +case CPU_DOWN_PREPARE_FROZEN :cpufreq_stats_free_sysfs (cpu);break ;case CPU_DEAD :
drivers/firmware/dmi_scan.c +2 -3
@@ -442,7 +442,6 @@ static int __init dmi_present(const char __iomem *p)static int __init smbios_present (const char __iomem *p) {u8 buf[32 ]; -int offset =0 ;memcpy_fromio (buf, p,32 );if ((buf[5 ] <32 ) &&dmi_checksum (buf, buf[5 ])) {
@@ -461,9 +460,9 @@ static int __init smbios_present(const char __iomem *p) dmi_ver =0x0206 ;break ; } - offset =16 ; +return memcmp (p +16 ,"_DMI_" ,5 ) ||dmi_present (p +16 ); } -return dmi_present (buf + offset); +return 1 ; }void __init dmi_scan_machine (void )
drivers/gpu/drm/radeon/radeon_combios.c +9 -0
@@ -958,6 +958,15 @@ struct radeon_encoder_primary_dac *radeon_combios_get_primary_dac_info(struct found =1 ; } +/* quirks */ +/* Radeon 9100 (R200) */ +if ((dev->pdev->device ==0x514D ) && + (dev->pdev->subsystem_vendor ==0x174B ) && + (dev->pdev->subsystem_device ==0x7149 )) { +/* vbios value is bad, use the default */ + found =0 ; + } +if (!found)/* fallback to defaults */ radeon_legacy_get_primary_dac_info_from_table (rdev, p_dac);
drivers/hid/hid-logitech-dj.c +14 -8
@@ -451,19 +451,25 @@ static int logi_dj_recv_send_report(struct dj_receiver_dev *djrcv_dev, struct dj_report *dj_report) {struct hid_device *hdev = djrcv_dev->hdev; -int sent_bytes; +struct hid_report *report; +struct hid_report_enum *output_report_enum; +u8 *data = (u8 *)(&dj_report->device_index); +int i; -if (!hdev->hid_output_raw_report) { -dev_err (&hdev->dev,"%s:" -"hid_output_raw_report is null\n" , __func__); + output_report_enum = &hdev->report_enum[HID_OUTPUT_REPORT ]; + report = output_report_enum->report_id_hash[REPORT_ID_DJ_SHORT ]; + +if (!report) { +dev_err (&hdev->dev,"%s: unable to find dj report\n" , __func__);return -ENODEV ; } - sent_bytes = hdev->hid_output_raw_report (hdev, (u8 *) dj_report, -sizeof (struct dj_report ), -HID_OUTPUT_REPORT ); +for (i =0 ; i < report->field[0 ]->report_count; i++) + report->field[0 ]->value[i] = data[i]; + +usbhid_submit_report (hdev, report,USB_DIR_OUT ); -return (sent_bytes <0 ) ? sent_bytes :0 ; +return 0 ; }static int logi_dj_recv_query_paired_devices (struct dj_receiver_dev *djrcv_dev)
drivers/hwmon/pmbus/ltc2978.c +16 -14
@@ -62,7 +62,7 @@ struct ltc2978_data {int temp_min, temp_max;int vout_min[8 ], vout_max[8 ];int iout_max[2 ]; -int temp2_max[2 ]; +int temp2_max;struct pmbus_driver_info info; };
@@ -204,10 +204,9 @@ static int ltc3880_read_word_data(struct i2c_client *client, int page, int reg) ret =pmbus_read_word_data (client, page,LTC3880_MFR_TEMPERATURE2_PEAK );if (ret >=0 ) { -if (lin11_to_val (ret) - >lin11_to_val (data->temp2_max[page])) - data->temp2_max[page] = ret; - ret = data->temp2_max[page]; +if (lin11_to_val (ret) >lin11_to_val (data->temp2_max)) + data->temp2_max = ret; + ret = data->temp2_max; }break ;case PMBUS_VIRT_READ_VIN_MIN :
@@ -248,11 +247,11 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page,switch (reg) {case PMBUS_VIRT_RESET_IOUT_HISTORY : - data->iout_max[page] =0x7fff ; + data->iout_max[page] =0x7c00 ; ret =ltc2978_clear_peaks (client, page, data->id);break ;case PMBUS_VIRT_RESET_TEMP2_HISTORY : - data->temp2_max[page] =0x7fff ; + data->temp2_max =0x7c00 ; ret =ltc2978_clear_peaks (client, page, data->id);break ;case PMBUS_VIRT_RESET_VOUT_HISTORY :
@@ -262,12 +261,12 @@ static int ltc2978_write_word_data(struct i2c_client *client, int page,break ;case PMBUS_VIRT_RESET_VIN_HISTORY : data->vin_min =0x7bff ; - data->vin_max =0 ; + data->vin_max =0x7c00 ; ret =ltc2978_clear_peaks (client, page, data->id);break ;case PMBUS_VIRT_RESET_TEMP_HISTORY : data->temp_min =0x7bff ; - data->temp_max =0x7fff ; + data->temp_max =0x7c00 ; ret =ltc2978_clear_peaks (client, page, data->id);break ;default :
@@ -321,12 +320,13 @@ static int ltc2978_probe(struct i2c_client *client, info = &data->info; info->write_word_data = ltc2978_write_word_data; - data->vout_min[0 ] =0xffff ; data->vin_min =0x7bff ; + data->vin_max =0x7c00 ; data->temp_min =0x7bff ; - data->temp_max =0x7fff ; + data->temp_max =0x7c00 ; + data->temp2_max =0x7c00 ; -switch (id->driver_data) { +switch (data->id) {case ltc2978: info->read_word_data = ltc2978_read_word_data; info->pages =8 ;
@@ -336,7 +336,6 @@ static int ltc2978_probe(struct i2c_client *client,for (i =1 ; i <8 ; i++) { info->func[i] =PMBUS_HAVE_VOUT |PMBUS_HAVE_STATUS_VOUT ; - data->vout_min[i] =0xffff ; }break ;case ltc3880:
@@ -352,11 +351,14 @@ static int ltc2978_probe(struct i2c_client *client, | PMBUS_HAVE_IOUT | PMBUS_HAVE_STATUS_IOUT |PMBUS_HAVE_POUT |PMBUS_HAVE_TEMP |PMBUS_HAVE_STATUS_TEMP ; - data->vout_min[1 ] =0xffff ; + data->iout_max[0 ] =0x7c00 ; + data->iout_max[1 ] =0x7c00 ;break ;default :return -ENODEV ; } +for (i =0 ; i < info->pages; i++) + data->vout_min[i] =0xffff ;return pmbus_do_probe (client, id, info); }
drivers/hwmon/sht15.c +7 -1
@@ -926,7 +926,13 @@ static int __devinit sht15_probe(struct platform_device *pdev)if (voltage) data->supply_uV = voltage; -regulator_enable (data->reg); + ret =regulator_enable (data->reg); +if (ret !=0 ) { +dev_err (&pdev->dev, +"failed to enable regulator: %d\n" , ret); +return ret; + } +/* * Setup a notifier block to update this if another device * causes the voltage to change
drivers/md/md.c +7 -0
@@ -344,6 +344,10 @@ static void md_make_request(struct request_queue *q, struct bio *bio)bio_io_error (bio);return ; } +if (mddev->ro ==1 &&unlikely (rw ==WRITE )) { +bio_endio (bio,bio_sectors (bio) ==0 ?0 : -EROFS ); +return ; + }smp_rmb ();/* Ensure implications of 'active' are visible */ rcu_read_lock ();if (mddev->suspended) {
@@ -2882,6 +2886,9 @@ rdev_size_store(struct md_rdev *rdev, const char *buf, size_t len) }else if (!sectors) sectors = (i_size_read (rdev->bdev->bd_inode) >>9 ) - rdev->data_offset; +if (!my_mddev->pers->resize) +/* Cannot change size for RAID0 or Linear etc */ +return -EINVAL ; }if (sectors < my_mddev->dev_sectors)return -EINVAL ;/* component must fit device */
drivers/md/raid0.c +3 -2
@@ -280,7 +280,7 @@ abort:kfree (conf->strip_zone);kfree (conf->devlist);kfree (conf); - *private_conf =NULL ; + *private_conf =ERR_PTR (err);return err; }
@@ -402,7 +402,8 @@ static sector_t raid0_size(struct mddev *mddev, sector_t sectors, int raid_disks "%s does not support generic reshape\n", __func__);rdev_for_each (rdev, mddev) - array_sectors += rdev->sectors; + array_sectors += (rdev->sectors & + ~(sector_t)(mddev->chunk_sectors-1 ));return array_sectors; }
drivers/net/ethernet/intel/e1000e/netdev.c +1 -1
@@ -5535,7 +5535,7 @@ static int __e1000_shutdown(struct pci_dev *pdev, bool *enable_wake,*/ e1000e_release_hw_control (adapter); -pci_disable_device (pdev); +pci_clear_master (pdev);return 0 ; }
drivers/net/wireless/ath/ath9k/common.h +1 -1
@@ -35,7 +35,7 @@#define WME_AC_BK 3#define WME_NUM_AC 4 -#define ATH_RSSI_DUMMY_MARKER 0x127 +#define ATH_RSSI_DUMMY_MARKER 127#define ATH_RSSI_LPF_LEN 10#define RSSI_LPF_THRESHOLD -20#define ATH_RSSI_EP_MULTIPLIER (1<<7)
drivers/net/wireless/ath/ath9k/hw.c +3 -1
@@ -1404,7 +1404,9 @@ static bool ath9k_hw_chip_reset(struct ath_hw *ah, reset_type =ATH9K_RESET_POWER_ON ; else reset_type =ATH9K_RESET_COLD ; - } + }else if (ah->chip_fullsleep ||REG_READ (ah,AR_Q_TXE ) || + (REG_READ (ah,AR_CR ) &AR_CR_RXE )) + reset_type =ATH9K_RESET_COLD ;if (!ath9k_hw_set_reset_reg (ah, reset_type))return false;
drivers/net/wireless/mwifiex/pcie.c +1 -1
@@ -288,7 +288,7 @@ static int mwifiex_pm_wakeup_card(struct mwifiex_adapter *adapter) i++;usleep_range (10 ,20 );/* 50ms max wait */ -if (i ==50000 ) +if (i ==5000 )break ; }
drivers/scsi/dc395x.c +1 -1
@@ -3747,13 +3747,13 @@ static struct DeviceCtlBlk *device_alloc(struct AdapterCtlBlk *acb, dcb->max_command =1 ; dcb->target_id = target; dcb->target_lun = lun; + dcb->dev_mode = eeprom->target[target].cfg0;#ifndef DC395x_NO_DISCONNECT dcb->identify_msg =IDENTIFY (dcb->dev_mode &NTC_DO_DISCONNECT , lun);#else dcb->identify_msg =IDENTIFY (0 , lun);#endif - dcb->dev_mode = eeprom->target[target].cfg0; dcb->inquiry7 =0 ; dcb->sync_mode =0 ; dcb->min_nego_period = clock_period[period_index];
drivers/scsi/storvsc_drv.c +1 -0
@@ -467,6 +467,7 @@ static struct scatterlist *create_bounce_buffer(struct scatterlist *sgl,if (!bounce_sgl)return NULL ; +sg_init_table (bounce_sgl, num_pages);for (i =0 ; i < num_pages; i++) { page_buf =alloc_page (GFP_ATOMIC );if (!page_buf)
drivers/target/target_core_pscsi.c +0 -1
@@ -1042,7 +1042,6 @@ static int pscsi_map_sg(struct se_task *task, struct scatterlist *task_sg, bio =NULL ; } - page++; len -= bytes; data_len -= bytes; off =0 ;
drivers/usb/core/hub.c +94 -84
241 lines not on this page · raw message
fs/btrfs/volumes.c +1 -0
@@ -557,6 +557,7 @@ static int __btrfs_close_devices(struct btrfs_fs_devices *fs_devices) new_device->writeable =0 ; new_device->in_fs_metadata =0 ; new_device->can_discard =0 ; +spin_lock_init (&new_device->io_lock);list_replace_rcu (&device->dev_list, &new_device->dev_list);call_rcu (&device->rcu, free_device);
fs/cifs/cifsfs.c +5 -0
@@ -557,6 +557,11 @@ cifs_get_root(struct smb_vol *vol, struct super_block *sb) dentry =ERR_PTR (-ENOENT );break ; } +if (!S_ISDIR (dir->i_mode)) { +dput (dentry); + dentry =ERR_PTR (-ENOTDIR ); +break ; + }/* skip separators */ while (*s == sep)
fs/compat.c +7 -8
@@ -558,6 +558,10 @@ ssize_t compat_rw_copy_check_uvector(int type, } *ret_pointer = iov; + ret = -EFAULT ; +if (!access_ok (VERIFY_READ , uvector, nr_segs*sizeof (*uvector))) + goto out; +/* * Single unix specification: * We should -EINVAL if an element length is not >= 0 and fitting an
@@ -1089,17 +1093,12 @@ static ssize_t compat_do_readv_writev(int type, struct file *file,if (!file->f_op) goto out; - ret = -EFAULT ; -if (!access_ok (VERIFY_READ , uvector, nr_segs*sizeof (*uvector))) - goto out; - - tot_len =compat_rw_copy_check_uvector (type, uvector, nr_segs, + ret =compat_rw_copy_check_uvector (type, uvector, nr_segs,UIO_FASTIOV , iovstack, &iov,1 ); -if (tot_len ==0 ) { - ret =0 ; +if (ret <=0 ) goto out; - } + tot_len = ret; ret =rw_verify_area (type, file, pos, tot_len);if (ret <0 ) goto out;
fs/nfs/unlink.c +13 -7
@@ -336,20 +336,14 @@ static void nfs_async_rename_done(struct rpc_task *task, void *calldata)struct inode *old_dir = data->old_dir;struct inode *new_dir = data->new_dir;struct dentry *old_dentry = data->old_dentry; -struct dentry *new_dentry = data->new_dentry;if (!NFS_PROTO (old_dir)->rename_done (task, old_dir, new_dir)) {rpc_restart_call_prepare (task);return ; } -if (task->tk_status !=0 ) { +if (task->tk_status !=0 )nfs_cancel_async_unlink (old_dentry); -return ; - } - -d_drop (old_dentry); -d_drop (new_dentry); }/**
@@ -550,6 +544,18 @@ nfs_sillyrename(struct inode *dir, struct dentry *dentry) error =rpc_wait_for_completion_task (task);if (error ==0 ) error = task->tk_status; +switch (error) { +case 0 : +/* The rename succeeded */ +nfs_set_verifier (dentry,nfs_save_change_attribute (dir)); +d_move (dentry, sdentry); +break ; +case -ERESTARTSYS : +/* The result of the rename is unknown. Play it safe by +* forcing a new lookup */ +d_drop (dentry); +d_drop (sdentry); + }rpc_put_task (task); out_dput:dput (sdentry);
fs/pipe.c +3 -0
@@ -860,6 +860,9 @@ pipe_rdwr_open(struct inode *inode, struct file *filp) {int ret = -ENOENT ; +if (!(filp->f_mode & (FMODE_READ |FMODE_WRITE ))) +return -EINVAL ; +mutex_lock (&inode->i_mutex);if (inode->i_pipe) {
kernel/trace/Kconfig +14 -10
@@ -386,24 +386,28 @@ config KPROBE_EVENT If you want to use perf tools, this option is strongly recommended. config DYNAMIC_FTRACE - bool "enable/disable ftrace tracepoints dynamically" + bool "enable/disable function tracing dynamically" depends on FUNCTION_TRACER depends on HAVE_DYNAMIC_FTRACE default y help - This option will modify all the calls to ftrace dynamically - (will patch them out of the binary image and replace them - with a No-Op instruction) as they are called. A table is - created to dynamically enable them again. + This option will modify all the calls to function tracing + dynamically (will patch them out of the binary image and + replace them with a No-Op instruction) on boot up. During + compile time, a table is made of all the locations that ftrace + can function trace, and this table is linked into the kernel + image. When this is enabled, functions can be individually + enabled, and the functions not enabled will not affect + performance of the system. + + See the files in /sys/kernel/debug/tracing: + available_filter_functions + set_ftrace_filter + set_ftrace_notrace This way a CONFIG_FUNCTION_TRACER kernel is slightly larger, but otherwise has native performance as long as no tracing is active. - The changes to the code are done by a kernel thread that - wakes up once a second and checks to see if any ftrace calls - were made. If so, it runs stop_machine (stops all CPUS) - and modifies the code to jump over the call to ftrace. - config FUNCTION_PROFILER bool "Kernel function profiler" depends on FUNCTION_TRACER
mm/process_vm_access.c +0 -8
@@ -429,12 +429,6 @@ compat_process_vm_rw(compat_pid_t pid,if (flags !=0 )return -EINVAL ; -if (!access_ok (VERIFY_READ , lvec, liovcnt *sizeof (*lvec))) - goto out; - -if (!access_ok (VERIFY_READ , rvec, riovcnt *sizeof (*rvec))) - goto out; -if (vm_write) rc = compat_rw_copy_check_uvector(WRITE, lvec, liovcnt, UIO_FASTIOV, iovstack_l,
@@ -459,8 +453,6 @@ free_iovecs:kfree (iov_r);if (iov_l != iovstack_l)kfree (iov_l); - -out:return rc; }
net/sunrpc/xprt.c +5 -1
@@ -485,13 +485,17 @@ EXPORT_SYMBOL_GPL(xprt_wake_pending_tasks);* xprt_wait_for_buffer_space - wait for transport output buffer to clear * @task: task to be put to sleep * @action: function pointer to be executed after wait +* +* Note that we only set the timer for the case of RPC_IS_SOFT(), since +* we don't in general want to force a socket disconnection due to +* an incomplete RPC call transmission. */ void xprt_wait_for_buffer_space (struct rpc_task *task,rpc_action action) {struct rpc_rqst *req = task->tk_rqstp;struct rpc_xprt *xprt = req->rq_xprt; - task->tk_timeout = req->rq_timeout; + task->tk_timeout =RPC_IS_SOFT (task) ? req->rq_timeout :0 ;rpc_sleep_on (&xprt->pending, task, action); }EXPORT_SYMBOL_GPL (xprt_wait_for_buffer_space);
security/keys/compat.c +2 -2
@@ -40,12 +40,12 @@ long compat_keyctl_instantiate_key_iov(ARRAY_SIZE (iovstack), iovstack, &iov, 1);if (ret <0 ) -return ret; + goto err;if (ret ==0 ) goto no_payload_free; ret =keyctl_instantiate_key_common (id, iov, ioc, ret, ringid); - +err:if (iov != iovstack)kfree (iov);return ret;
security/keys/process_keys.c +1 -1
@@ -54,7 +54,7 @@ int install_user_keyrings(void)kenter ("%p{%u}" , user, user->uid); -if (user->uid_keyring) { +if (user->uid_keyring && user->session_keyring) {kleave (" = 0 [exist]" );return 0 ; }
sound/core/vmaster.c +4 -1
@@ -213,7 +213,10 @@ static int slave_put(struct snd_kcontrol *kcontrol, }if (!changed)return 0 ; -return slave_put_val (slave, ucontrol); + err =slave_put_val (slave, ucontrol); +if (err <0 ) +return err; +return 1 ; } static int slave_tlv_cmd(struct snd_kcontrol *kcontrol,
sound/pci/hda/patch_hdmi.c +0 -3
@@ -1244,9 +1244,6 @@ static int generic_hdmi_build_jack(struct hda_codec *codec, int pin_idx)if (pcmdev >0 )sprintf (hdmi_str +strlen (hdmi_str),",pcm=%d" , pcmdev); -if (!is_jack_detectable (codec, per_pin->pin_nid)) -strncat (hdmi_str," Phantom" , -sizeof (hdmi_str) -strlen (hdmi_str) -1 );return snd_hda_jack_add_kctl (codec, per_pin->pin_nid, hdmi_str,0 ); }
sound/pci/ice1712/ice1712.c +2 -0
@@ -2595,6 +2595,8 @@ static int __devinit snd_ice1712_create(struct snd_card *card,snd_ice1712_proc_init (ice);synchronize_irq (pci->irq); + card->private_data = ice; + err =pci_request_regions (pci,"ICE1712" );if (err <0 ) {kfree (ice);