Linux 3.4.35
Greg KH
maintainerI'm announcing the release of the 3.4.35 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
------------
Documentation/kernel-parameters.txt | 5 ++ Makefile | 2 arch/x86/kernel/head.c | 53 ++++++++++++++++---------- arch/x86/platform/efi/efi.c | 5 +- block/genhd.c | 15 +++---- block/partition-generic.c | 2 drivers/acpi/sleep.c | 8 +++ drivers/ata/ata_piix.c | 17 ++++++++ drivers/block/xen-blkback/blkback.c | 1 drivers/block/xen-blkback/xenbus.c | 49 +++++++++++------------- drivers/firewire/core-device.c | 4 + drivers/hid/hid-core.c | 1 drivers/hid/hid-ids.h | 3 + drivers/iommu/amd_iommu_init.c | 9 +++- drivers/media/rc/rc-main.c | 4 + drivers/net/wireless/ath/ath9k/ar9003_calib.c | 2 drivers/net/wireless/ath/ath9k/ar9003_phy.c | 2 drivers/net/wireless/ath/ath9k/hw.h | 1 drivers/power/ab8500_btemp.c | 2 drivers/power/abx500_chargalg.c | 2 drivers/staging/comedi/comedi_fops.c | 8 +-- drivers/staging/comedi/drivers/ni_labpc.c | 35 +++++++++-------- drivers/target/target_core_device.c | 13 +----- drivers/target/target_core_fabric_configfs.c | 12 ++++- drivers/target/target_core_internal.h | 2 drivers/target/target_core_tpg.c | 10 ---- drivers/vhost/vhost.c | 2 fs/direct-io.c | 2 fs/ext4/balloc.c | 13 ++++-- fs/ext4/mballoc.c | 6 +- fs/ext4/xattr.c | 7 +-- fs/fuse/dir.c | 9 +++- fs/nfsd/nfs4state.c | 2 fs/ocfs2/aops.c | 2 fs/ocfs2/suballoc.c | 7 +-- fs/ocfs2/suballoc.h | 2 fs/ocfs2/xattr.c | 2 fs/pstore/platform.c | 35 ++++++++++++++--- include/linux/auto_fs.h | 25 +++--------- include/linux/pstore.h | 6 ++ include/linux/quota.h | 1 kernel/cgroup.c | 8 +++ kernel/cpuset.c | 12 ++++- kernel/posix-timers.c | 7 +++ kernel/sysctl_binary.c | 3 - kernel/trace/ftrace.c | 46 +++++++++++++++------- lib/idr.c | 9 +++- net/sunrpc/svc_xprt.c | 15 ------- sound/pci/hda/patch_hdmi.c | 3 + tools/perf/Makefile | 4 - tools/perf/util/parse-events.y | 1 tools/perf/util/pmu.y | 1 52 files changed, 318 insertions(+), 179 deletions(-)
Alexey Klimov (1):
usb hid quirks for Masterkit MA901 usb radio
Dan Carpenter (1):
media: rc: unlock on error in show_protocols()
David Henningsson (1):
ALSA: hda - hdmi: Make jacks phantom, if they're not detectable
Eryu Guan (1):
ext4: check bh in ext4_read_block_bitmap()
Felix Fietkau (1):
ath9k_hw: fix calibration issues on chainmask that don't include chain 0
Greg Kroah-Hartman (1):
Linux 3.4.35
H. Peter Anvin (1):
x86: Make sure we can boot in the case the BDA contains pure garbage
Helge Deller (1):
unbreak automounter support on 64-bit kernel with 32-bit userspace (v2)
Ian Abbott (3):
staging: comedi: ni_labpc: correct differential channel sequence for AI commands
staging: comedi: ni_labpc: set up command4 register *after* command3
staging: comedi: check s->async for poll(), read() and write()
J. Bruce Fields (1):
svcrpc: make svc_age_temp_xprts enqueue under sv_lock
James Ralston (1):
ata_piix: Add Device IDs for Intel Wellsburg PCH
Jan Beulich (1):
xen-blkback: do not leak mode property
Jan Kara (2):
ocfs2: fix possible use-after-free with AIO
fs: Fix possible use-after-free with AIO
Jeff Liu (1):
ocfs2: fix ocfs2_init_security_and_acl() to initialize acl correctly
Joerg Roedel (1):
iommu/amd: Initialize device table after dma_ops
Joseph Salisbury (1):
ACPI: Add DMI entry for Sony VGN-FW41E_H
Konrad Rzeszutek Wilk (3):
doc, xen: Mention 'earlyprintk=xen' in the documentation. doc, kernel-parameters: Document 'console=hvc<n>' xen/blkback: Don't trust the handle from the frontend.
Lee Jones (1):
ab8500-chargalg: Only root should have write permission on sysfs file
Li Zefan (2):
cpuset: fix cpuset_print_task_mems_allowed() vs rename() race
cgroup: fix exit() vs rmdir() race
Lukas Czerner (2):
ext4: fix xattr block allocation/release with bigalloc
ext4: fix free clusters calculation in bigalloc filesystem
Matt Fleming (1):
x86, efi: Make "noefi" really disable EFI runtime serivces
Michael S. Tsirkin (1):
vhost: fix length for cross region descriptor
Miklos Szeredi (1):
fuse: don't WARN when nlink is zero
Nicholas Bellinger (2):
target: Fix lookup of dynamic NodeACLs during cached demo-mode operation
target: Add missing mapped_lun bounds checking during make_mappedlun setup
Niu Yawei (1):
ext4: fix race in ext4_mb_add_n_trim()
Rajanikanth H.V (1):
ab8500_btemp: Demote initcall sequence
Seiji Aguchi (1):
pstore: Avoid deadlock in panic and emergency-restart path
Seth Heasley (1):
ata_piix: IDE-mode SATA patch for Intel Avoton DeviceIDs
Steven Rostedt (Red Hat) (1):
ftrace: Call ftrace cleanup module notifier after all other notifiers
Tejun Heo (4):
posix-timer: Don't call idr_find() with out-of-range ID
idr: fix a subtle bug in idr_get_next()
block: fix synchronization and limit check in blk_alloc_devt()
firewire: add minor number range check to fw_device_init()
Theodore Ts'o (1):
quota: autoload the quota_v2 module for QFMT_VFS_V1 quota format
Tomas Henzl (1):
block: fix ext_devt_idr handling
Vinson Lee (1):
perf tools: Fix build with bison 2.3 and older.
Xi Wang (1):
sysctl: fix null checking in bin_dn_node_address()
Xiaowei.Hu (1):
ocfs2: ac->ac_allow_chain_relink=0 won't disable group relink
majianpeng (1):
nfsd: Fix memleak
Greg KH
maintainerDocumentation/kernel-parameters.txt +5 -0
@@ -557,6 +557,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. UART at the specified I/O port or MMIO address, switching to the matching ttyS device later. The options are the same as for ttyS, above. + hvc<n> Use the hypervisor console device <n>. This is for + both Xen and PowerPC hypervisors. If the device connected to the port is not a TTY but a braille device, prepend "brl," before the device type, for instance
@@ -742,6 +744,7 @@ bytes respectively. Such letter suffixes can also be entirely omitted. earlyprintk= [X86,SH,BLACKFIN] earlyprintk=vga + earlyprintk=xen earlyprintk=serial[,ttySn[,baudrate]] earlyprintk=ttySn[,baudrate] earlyprintk=dbgp[debugController#]
@@ -759,6 +762,8 @@ bytes respectively. Such letter suffixes can also be entirely omitted. The VGA output is eventually overwritten by the real console. + The xen output can only be used by Xen PV guests. + ekgdboc= [X86,KGDB] Allow early kernel console debugging ekgdboc=kbd
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 34 +SUBLEVEL = 35 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/x86/kernel/head.c +34 -19
78 lines not on this page · raw message
arch/x86/platform/efi/efi.c +3 -2
@@ -84,9 +84,10 @@ int efi_enabled(int facility) }EXPORT_SYMBOL (efi_enabled); +static bool disable_runtime = false;static int __init setup_noefi (char *arg) { -clear_bit (EFI_RUNTIME_SERVICES , &x86_efi_facility); + disable_runtime = true;return 0 ; }early_param ("noefi" , setup_noefi);
@@ -733,7 +734,7 @@ void __init efi_init(void)if (!efi_is_native ())pr_info ("No EFI runtime due to 32/64-bit mismatch with kernel\n" );else { -if (efi_runtime_init ()) +if (disable_runtime ||efi_runtime_init ())return ;set_bit (EFI_RUNTIME_SERVICES , &x86_efi_facility); }
block/genhd.c +8 -7
@@ -25,7 +25,7 @@ static DEFINE_MUTEX(block_class_lock);struct kobject *block_depr;/* for extended dynamic devt allocation, currently only one major is used */ -#define MAX_EXT_DEVT (1 << MINORBITS) +#define NR_EXT_DEVT (1 << MINORBITS)/* For extended devt allocation. ext_devt_mutex prevents look up * results from going away underneath its user.
@@ -420,17 +420,18 @@ int blk_alloc_devt(struct hd_struct *part, dev_t *devt)do {if (!idr_pre_get (&ext_devt_idr,GFP_KERNEL ))return -ENOMEM ; +mutex_lock (&ext_devt_mutex); rc =idr_get_new (&ext_devt_idr, part, &idx); +if (!rc && idx >=NR_EXT_DEVT ) { +idr_remove (&ext_devt_idr, idx); + rc = -EBUSY ; + } +mutex_unlock (&ext_devt_mutex); }while (rc == -EAGAIN );if (rc)return rc; -if (idx >MAX_EXT_DEVT ) { -idr_remove (&ext_devt_idr, idx); -return -EBUSY ; - } - *devt =MKDEV (BLOCK_EXT_MAJOR ,blk_mangle_minor (idx));return 0 ; }
@@ -644,7 +645,6 @@ void del_gendisk(struct gendisk *disk)disk_part_iter_exit (&piter);invalidate_partition (disk,0 ); -blk_free_devt (disk_to_dev (disk)->devt);set_capacity (disk,0 ); disk->flags &= ~GENHD_FL_UP ;
@@ -662,6 +662,7 @@ void del_gendisk(struct gendisk *disk)if (!sysfs_deprecated)sysfs_remove_link (block_depr,dev_name (disk_to_dev (disk)));device_del (disk_to_dev (disk)); +blk_free_devt (disk_to_dev (disk)->devt); }EXPORT_SYMBOL (del_gendisk);
block/partition-generic.c +1 -1
@@ -249,11 +249,11 @@ void delete_partition(struct gendisk *disk, int partno)if (!part)return ; -blk_free_devt (part_devt (part));rcu_assign_pointer (ptbl->part[partno],NULL );rcu_assign_pointer (ptbl->last_lookup,NULL );kobject_put (part->holder_dir);device_del (part_to_dev (part)); +blk_free_devt (part_devt (part));hd_struct_put (part); }
drivers/acpi/sleep.c +8 -0
@@ -186,6 +186,14 @@ static struct dmi_system_id __initdata acpisleep_dmi_table[] = { }, { .callback = init_nvs_nosave, + .ident = "Sony Vaio VGN-FW41E_H", + .matches = { +DMI_MATCH (DMI_SYS_VENDOR ,"Sony Corporation" ), + DMI_MATCH(DMI_PRODUCT_NAME, "VGN-FW41E_H"), + }, + }, + { + .callback = init_nvs_nosave, .ident = "Sony Vaio VGN-FW21E", .matches = { DMI_MATCH(DMI_SYS_VENDOR, "Sony Corporation"),
drivers/ata/ata_piix.c +17 -0
@@ -331,6 +331,23 @@ static const struct pci_device_id piix_pci_tbl[] = { { 0x8086, 0x8c09, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata },/* SATA Controller IDE (DH89xxCC) */ { 0x8086, 0x2326, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, +/* SATA Controller IDE (Avoton) */ + { 0x8086, 0x1f20, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, +/* SATA Controller IDE (Avoton) */ + { 0x8086, 0x1f21, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, +/* SATA Controller IDE (Avoton) */ + { 0x8086, 0x1f30, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, +/* SATA Controller IDE (Avoton) */ + { 0x8086, 0x1f31, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, +/* SATA Controller IDE (Wellsburg) */ + { 0x8086, 0x8d00, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, +/* SATA Controller IDE (Wellsburg) */ + { 0x8086, 0x8d08, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, +/* SATA Controller IDE (Wellsburg) */ + { 0x8086, 0x8d60, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_sata_snb }, +/* SATA Controller IDE (Wellsburg) */ + { 0x8086, 0x8d68, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich8_2port_sata }, + { } /* terminate list */ };
drivers/block/xen-blkback/blkback.c +0 -1
@@ -623,7 +623,6 @@ static int dispatch_rw_block_io(struct xen_blkif *blkif, goto fail_response; } - preq.dev = req->u.rw.handle; preq.sector_number = req->u.rw.sector_number; preq.nr_sects =0 ;
drivers/block/xen-blkback/xenbus.c +24 -25
82 lines not on this page · raw message
drivers/firewire/core-device.c +4 -0
@@ -999,6 +999,10 @@ static void fw_device_init(struct work_struct *work) ret =idr_pre_get (&fw_device_idr,GFP_KERNEL ) ?idr_get_new (&fw_device_idr, device, &minor) : -ENOMEM ; +if (minor >=1 <<MINORBITS ) { +idr_remove (&fw_device_idr, minor); + minor = -ENOSPC ; + }up_write (&fw_device_rwsem);if (ret <0 )
drivers/hid/hid-core.c +1 -0
@@ -1922,6 +1922,7 @@ static const struct hid_device_id hid_ignore_list[] = { { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HYBRID) }, { HID_USB_DEVICE(USB_VENDOR_ID_LD, USB_DEVICE_ID_LD_HEATCONTROL) }, { HID_USB_DEVICE(USB_VENDOR_ID_MADCATZ, USB_DEVICE_ID_MADCATZ_BEATPAD) }, + { HID_USB_DEVICE(USB_VENDOR_ID_MASTERKIT, USB_DEVICE_ID_MASTERKIT_MA901RADIO) }, { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1024LS) }, { HID_USB_DEVICE(USB_VENDOR_ID_MCC, USB_DEVICE_ID_MCC_PMD1208LS) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROCHIP, USB_DEVICE_ID_PICKIT1) },
drivers/hid/hid-ids.h +3 -0
@@ -520,6 +520,9 @@#define USB_VENDOR_ID_MADCATZ 0x0738#define USB_DEVICE_ID_MADCATZ_BEATPAD 0x4540 +#define USB_VENDOR_ID_MASTERKIT 0x16c0 +#define USB_DEVICE_ID_MASTERKIT_MA901RADIO 0x05df +#define USB_VENDOR_ID_MCC 0x09db#define USB_DEVICE_ID_MCC_PMD1024LS 0x0076#define USB_DEVICE_ID_MCC_PMD1208LS 0x007a
drivers/iommu/amd_iommu_init.c +7 -2
@@ -1572,8 +1572,6 @@ int __init amd_iommu_init_hardware(void)if (amd_iommu_pd_alloc_bitmap ==NULL ) goto free; -/* init the device table */ -init_device_table ();/* * let all alias entries point to itself
@@ -1655,6 +1653,7 @@ out:*/ static int __init amd_iommu_init (void ) { +struct amd_iommu *iommu;int ret =0 ; ret =amd_iommu_init_hardware ();
@@ -1673,6 +1672,12 @@ static int __init amd_iommu_init(void)if (ret) goto free; +/* init the device table */ +init_device_table (); + +for_each_iommu (iommu) +iommu_flush_all_caches (iommu); +amd_iommu_init_api (); x86_platform.iommu_shutdown = disable_iommus;
drivers/media/rc/rc-main.c +3 -1
@@ -778,8 +778,10 @@ static ssize_t show_protocols(struct device *device, }else if (dev->raw) { enabled = dev->raw->enabled_protocols; allowed =ir_raw_get_allowed_protocols (); - }else + }else { +mutex_unlock (&dev->lock);return -ENODEV ; + } IR_dprintk(1, "allowed - 0x%llx, enabled - 0x%llx\n", (long long)allowed,
drivers/net/wireless/ath/ath9k/ar9003_calib.c +2 -0
@@ -938,6 +938,8 @@ static bool ar9003_hw_init_cal(struct ath_hw *ah,AR_PHY_CL_TAB_1 , AR_PHY_CL_TAB_2 }; +ar9003_hw_set_chain_masks (ah, ah->caps.rx_chainmask, ah->caps.tx_chainmask); +if (rtt) {if (!ar9003_hw_rtt_restore (ah, chan)) run_rtt_cal = true;
drivers/net/wireless/ath/ath9k/ar9003_phy.c +1 -1
@@ -543,7 +543,7 @@ static void ar9003_hw_init_bb(struct ath_hw *ah,udelay (synthDelay +BASE_ACTIVATE_DELAY ); } -static void ar9003_hw_set_chain_masks (struct ath_hw *ah,u8 rx,u8 tx) +void ar9003_hw_set_chain_masks (struct ath_hw *ah,u8 rx,u8 tx) {switch (rx) {case 0x5 :
drivers/net/wireless/ath/ath9k/hw.h +1 -0
@@ -1014,6 +1014,7 @@ int ar9003_paprd_setup_gain_table(struct ath_hw *ah, int chain);int ar9003_paprd_init_table (struct ath_hw *ah);bool ar9003_paprd_is_done (struct ath_hw *ah);void ar9003_hw_set_paprd_txdesc (struct ath_hw *ah,void *ds,u8 chains); +void ar9003_hw_set_chain_masks (struct ath_hw *ah,u8 rx,u8 tx);/* Hardware family op attach helpers */ void ar5008_hw_attach_phy_ops (struct ath_hw *ah);
drivers/power/ab8500_btemp.c +1 -1
@@ -1115,7 +1115,7 @@ static void __exit ab8500_btemp_exit(void)platform_driver_unregister (&ab8500_btemp_driver); } -subsys_initcall_sync (ab8500_btemp_init); +device_initcall (ab8500_btemp_init);module_exit (ab8500_btemp_exit);MODULE_LICENSE ("GPL v2" );
drivers/power/abx500_chargalg.c +1 -1
@@ -1698,7 +1698,7 @@ static ssize_t abx500_chargalg_sysfs_charger(struct kobject *kobj,static struct attribute abx500_chargalg_en_charger = \ { .name ="chargalg" , - .mode =S_IWUGO , + .mode =S_IWUSR , };static struct attribute *abx500_chargalg_chg[] = {
drivers/staging/comedi/comedi_fops.c +4 -4
@@ -1577,7 +1577,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait) mask =0 ; read_subdev =comedi_get_read_subdevice (dev_file_info); -if (read_subdev) { +if (read_subdev && read_subdev->async) {poll_wait (file, &read_subdev->async->wait_head, wait);if (!read_subdev->busy || comedi_buf_read_n_available(read_subdev->async) > 0
@@ -1587,7 +1587,7 @@ static unsigned int comedi_poll(struct file *file, poll_table * wait) } } write_subdev =comedi_get_write_subdevice (dev_file_info); -if (write_subdev) { +if (write_subdev && write_subdev->async) {poll_wait (file, &write_subdev->async->wait_head, wait);comedi_buf_write_alloc (write_subdev->async, write_subdev->async->prealloc_bufsz);
@@ -1629,7 +1629,7 @@ static ssize_t comedi_write(struct file *file, const char __user *buf, } s =comedi_get_write_subdevice (dev_file_info); -if (s ==NULL ) { +if (s ==NULL || s->async ==NULL ) { retval = -EIO ; goto done; }
@@ -1740,7 +1740,7 @@ static ssize_t comedi_read(struct file *file, char __user *buf, size_t nbytes, } s =comedi_get_read_subdevice (dev_file_info); -if (s ==NULL ) { +if (s ==NULL || s->async ==NULL ) { retval = -EIO ; goto done; }
drivers/staging/comedi/drivers/ni_labpc.c +19 -16
@@ -1264,7 +1264,9 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)else channel =CR_CHAN (cmd->chanlist[0 ]);/* munge channel bits for differential / scan disabled mode */ -if (labpc_ai_scan_mode (cmd) !=MODE_SINGLE_CHAN && aref ==AREF_DIFF ) +if ((labpc_ai_scan_mode (cmd) ==MODE_SINGLE_CHAN || +labpc_ai_scan_mode (cmd) ==MODE_SINGLE_CHAN_INTERVAL ) && + aref ==AREF_DIFF ) channel *=2 ; devpriv->command1_bits |=ADC_CHAN_BITS (channel); devpriv->command1_bits |= thisboard->ai_range_code[range];
@@ -1280,21 +1282,6 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) devpriv->write_byte (devpriv->command1_bits, dev->iobase +COMMAND1_REG ); } -/* setup any external triggering/pacing (command4 register) */ - devpriv->command4_bits =0 ; -if (cmd->convert_src !=TRIG_EXT ) - devpriv->command4_bits |=EXT_CONVERT_DISABLE_BIT ; -/* XXX should discard first scan when using interval scanning -* since manual says it is not synced with scan clock */ -if (labpc_use_continuous_mode (cmd) ==0 ) { - devpriv->command4_bits |=INTERVAL_SCAN_EN_BIT ; -if (cmd->scan_begin_src ==TRIG_EXT ) - devpriv->command4_bits |=EXT_SCAN_EN_BIT ; - } -/* single-ended/differential */ -if (aref ==AREF_DIFF ) - devpriv->command4_bits |=ADC_DIFF_BIT ; - devpriv->write_byte (devpriv->command4_bits, dev->iobase +COMMAND4_REG ); devpriv->write_byte (cmd->chanlist_len, dev->iobase +INTERVAL_COUNT_REG );
@@ -1374,6 +1361,22 @@ static int labpc_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s) devpriv->command3_bits &= ~ADC_FNE_INTR_EN_BIT ; devpriv->write_byte (devpriv->command3_bits, dev->iobase +COMMAND3_REG ); +/* setup any external triggering/pacing (command4 register) */ + devpriv->command4_bits =0 ; +if (cmd->convert_src !=TRIG_EXT ) + devpriv->command4_bits |=EXT_CONVERT_DISABLE_BIT ; +/* XXX should discard first scan when using interval scanning +* since manual says it is not synced with scan clock */ +if (labpc_use_continuous_mode (cmd) ==0 ) { + devpriv->command4_bits |=INTERVAL_SCAN_EN_BIT ; +if (cmd->scan_begin_src ==TRIG_EXT ) + devpriv->command4_bits |=EXT_SCAN_EN_BIT ; + } +/* single-ended/differential */ +if (aref ==AREF_DIFF ) + devpriv->command4_bits |=ADC_DIFF_BIT ; + devpriv->write_byte (devpriv->command4_bits, dev->iobase +COMMAND4_REG ); +/* startup acquisition */ /* command2 reg */
drivers/target/target_core_device.c +4 -9
@@ -1483,24 +1483,18 @@ static struct se_lun *core_dev_get_lun(struct se_portal_group *tpg, u32 unpackedstruct se_lun_acl *core_dev_init_initiator_node_lun_acl (struct se_portal_group *tpg, +struct se_node_acl *nacl,u32 mapped_lun, -char *initiatorname,int *ret) {struct se_lun_acl *lacl; -struct se_node_acl *nacl; -if (strlen (initiatorname) >=TRANSPORT_IQN_LEN ) { +if (strlen (nacl->initiatorname) >=TRANSPORT_IQN_LEN ) {pr_err ("%s InitiatorName exceeds maximum size.\n" , tpg->se_tpg_tfo->get_fabric_name ()); *ret = -EOVERFLOW ;return NULL ; } - nacl =core_tpg_get_initiator_node_acl (tpg, initiatorname); -if (!nacl) { - *ret = -EINVAL ; -return NULL ; - } lacl =kzalloc (sizeof (struct se_lun_acl ),GFP_KERNEL );if (!lacl) {pr_err ("Unable to allocate memory for struct se_lun_acl.\n" );
@@ -1511,7 +1505,8 @@ struct se_lun_acl *core_dev_init_initiator_node_lun_acl(INIT_LIST_HEAD (&lacl->lacl_list); lacl->mapped_lun = mapped_lun; lacl->se_lun_nacl = nacl; -snprintf (lacl->initiatorname,TRANSPORT_IQN_LEN ,"%s" , initiatorname); +snprintf (lacl->initiatorname,TRANSPORT_IQN_LEN ,"%s" , + nacl->initiatorname);return lacl; }
drivers/target/target_core_fabric_configfs.c +10 -2
@@ -356,9 +356,17 @@ static struct config_group *target_fabric_make_mappedlun( ret = -EINVAL ; goto out; } +if (mapped_lun > (TRANSPORT_MAX_LUNS_PER_TPG -1 )) { +pr_err ("Mapped LUN: %lu exceeds TRANSPORT_MAX_LUNS_PER_TPG" +"-1: %u for Target Portal Group: %u\n" , mapped_lun, +TRANSPORT_MAX_LUNS_PER_TPG -1 , + se_tpg->se_tpg_tfo->tpg_get_tag (se_tpg)); + ret = -EINVAL ; + goto out; + } - lacl =core_dev_init_initiator_node_lun_acl (se_tpg, mapped_lun, -config_item_name (acl_ci), &ret); + lacl =core_dev_init_initiator_node_lun_acl (se_tpg, se_nacl, + mapped_lun, &ret);if (!lacl) { ret = -EINVAL ; goto out;
drivers/target/target_core_internal.h +1 -1
@@ -61,7 +61,7 @@ struct se_lun *core_dev_add_lun(struct se_portal_group *, struct se_hba *,int core_dev_del_lun (struct se_portal_group *,u32 );struct se_lun *core_get_lun_from_tpg (struct se_portal_group *,u32 );struct se_lun_acl *core_dev_init_initiator_node_lun_acl (struct se_portal_group *, -u32 ,char *,int *); +struct se_node_acl *,u32 ,int *);int core_dev_add_initiator_node_lun_acl (struct se_portal_group *,struct se_lun_acl *,u32 ,u32 ); int core_dev_del_initiator_node_lun_acl(struct se_portal_group *,
drivers/target/target_core_tpg.c +2 -8
@@ -114,16 +114,10 @@ struct se_node_acl *core_tpg_get_initiator_node_acl(struct se_node_acl *acl;spin_lock_irq (&tpg->acl_node_lock); -list_for_each_entry (acl, &tpg->acl_node_list, acl_list) { -if (!strcmp (acl->initiatorname, initiatorname) && - !acl->dynamic_node_acl) { -spin_unlock_irq (&tpg->acl_node_lock); -return acl; - } - } + acl =__core_tpg_get_initiator_node_acl (tpg, initiatorname);spin_unlock_irq (&tpg->acl_node_lock); -return NULL ; +return acl; }/* core_tpg_add_node_to_devs():
drivers/vhost/vhost.c +1 -1
@@ -1074,7 +1074,7 @@ static int translate_desc(struct vhost_dev *dev, u64 addr, u32 len, } _iov = iov + ret; size = reg->memory_size - addr + reg->guest_phys_addr; - _iov->iov_len =min ((u64 )len, size); + _iov->iov_len =min ((u64 )len - s, size); _iov->iov_base = (void __user *)(unsigned long ) (reg->userspace_addr + addr - reg->guest_phys_addr); s += size;
fs/direct-io.c +1 -1
@@ -305,9 +305,9 @@ static ssize_t dio_complete(struct dio *dio, loff_t offset, ssize_t ret, bool is dio->end_io (dio->iocb, offset, transferred, dio->private, ret, is_async); }else { +inode_dio_done (dio->inode);if (is_async)aio_complete (dio->iocb, ret,0 ); -inode_dio_done (dio->inode); }return ret;
fs/ext4/balloc.c +10 -3
@@ -326,7 +326,7 @@ err_out:return 0 ; }/** -* ext4_read_block_bitmap() +* ext4_read_block_bitmap_nowait() * @sb: super block * @block_group: given block group *
@@ -422,6 +422,8 @@ ext4_read_block_bitmap(struct super_block *sb, ext4_group_t block_group)struct buffer_head *bh; bh =ext4_read_block_bitmap_nowait (sb, block_group); +if (!bh) +return NULL ;if (ext4_wait_block_bitmap (sb, block_group, bh)) {put_bh (bh);return NULL ;
@@ -447,11 +449,16 @@ static int ext4_has_free_clusters(struct ext4_sb_info *sbi, free_clusters =percpu_counter_read_positive (fcc); dirty_clusters =percpu_counter_read_positive (dcc); - root_clusters =EXT4_B2C (sbi,ext4_r_blocks_count (sbi->s_es)); + +/* +* r_blocks_count should always be multiple of the cluster ratio so +* we are safe to do a plane bit shift only. +*/ + root_clusters =ext4_r_blocks_count (sbi->s_es) >> sbi->s_cluster_bits;if (free_clusters - (nclusters + root_clusters + dirty_clusters) <EXT4_FREECLUSTERS_WATERMARK ) { - free_clusters =EXT4_C2B (sbi,percpu_counter_sum_positive (fcc)); + free_clusters =percpu_counter_sum_positive (fcc); dirty_clusters =percpu_counter_sum_positive (dcc); }/* Check whether we have space after accounting for current
fs/ext4/mballoc.c +3 -3
@@ -4126,7 +4126,7 @@ static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac)/* The max size of hash table is PREALLOC_TB_SIZE */ order =PREALLOC_TB_SIZE -1 ;/* Add the prealloc space to lg */ -rcu_read_lock (); +spin_lock (&lg->lg_prealloc_lock);list_for_each_entry_rcu (tmp_pa, &lg->lg_prealloc_list[order], pa_inode_list) {spin_lock (&tmp_pa->pa_lock);
@@ -4150,12 +4150,12 @@ static void ext4_mb_add_n_trim(struct ext4_allocation_context *ac)if (!added)list_add_tail_rcu (&pa->pa_inode_list, &lg->lg_prealloc_list[order]); -rcu_read_unlock (); +spin_unlock (&lg->lg_prealloc_lock);/* Now trim the list to be not more than 8 elements */ if (lg_prealloc_count >8 ) {ext4_mb_discard_lg_preallocations (sb, lg, - order, lg_prealloc_count); + order, lg_prealloc_count);return ; }return ;
fs/ext4/xattr.c +4 -3
@@ -495,7 +495,7 @@ ext4_xattr_release_block(handle_t *handle, struct inode *inode, error =ext4_handle_dirty_metadata (handle, inode, bh);if (IS_SYNC (inode))ext4_handle_sync (handle); -dquot_free_block (inode,1 ); +dquot_free_block (inode,EXT4_C2B (EXT4_SB (inode->i_sb),1 ));ea_bdebug (bh,"refcount now=%d; releasing" ,le32_to_cpu (BHDR (bh)->h_refcount)); }
@@ -784,7 +784,8 @@ inserted:else {/* The old block is released after updating the inode. */ - error =dquot_alloc_block (inode,1 ); + error =dquot_alloc_block (inode, +EXT4_C2B (EXT4_SB (sb),1 ));if (error) goto cleanup; error = ext4_journal_get_write_access(handle,
@@ -880,7 +881,7 @@ cleanup:return error; cleanup_dquot: -dquot_free_block (inode,1 ); +dquot_free_block (inode,EXT4_C2B (EXT4_SB (sb),1 )); goto cleanup; bad_block:
fs/fuse/dir.c +8 -1
@@ -645,7 +645,14 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry)spin_lock (&fc->lock); fi->attr_version = ++fc->attr_version; -drop_nlink (inode); +/* +* If i_nlink == 0 then unlink doesn't make sense, yet this can +* happen if userspace filesystem is careless. It would be +* difficult to enforce correct nlink usage so just ignore this +* condition here +*/ +if (inode->i_nlink >0 ) +drop_nlink (inode);spin_unlock (&fc->lock);fuse_invalidate_attr (inode);fuse_invalidate_attr (dir);
fs/nfsd/nfs4state.c +2 -0
@@ -1053,6 +1053,8 @@ free_client(struct nfs4_client *clp)put_group_info (clp->cl_cred.cr_group_info);kfree (clp->cl_principal);kfree (clp->cl_name.data); +idr_remove_all (&clp->cl_stateids); +idr_destroy (&clp->cl_stateids);kfree (clp); }
fs/ocfs2/aops.c +1 -1
@@ -593,9 +593,9 @@ static void ocfs2_dio_end_io(struct kiocb *iocb, level =ocfs2_iocb_rw_locked_level (iocb);ocfs2_rw_unlock (inode, level); +inode_dio_done (inode);if (is_async)aio_complete (iocb, ret,0 ); -inode_dio_done (inode); }/*
fs/ocfs2/suballoc.c +3 -4
@@ -642,7 +642,7 @@ ocfs2_block_group_alloc_discontig(handle_t *handle,* cluster groups will be staying in cache for the duration of * this operation. */ - ac->ac_allow_chain_relink =0 ; + ac->ac_disable_chain_relink =1 ;/* Claim the first region */ status = ocfs2_block_group_claim_bits(osb, handle, ac, min_bits,
@@ -1823,7 +1823,7 @@ static int ocfs2_search_chain(struct ocfs2_alloc_context *ac,* Do this *after* figuring out how many bits we're taking out * of our target group. */ -if (ac->ac_allow_chain_relink && +if (!ac->ac_disable_chain_relink && (prev_group_bh) && (ocfs2_block_group_reasonably_empty (bg, res->sr_bits))) { status = ocfs2_relink_block_group(handle, alloc_inode,
@@ -1928,7 +1928,6 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac, victim =ocfs2_find_victim_chain (cl); ac->ac_chain = victim; - ac->ac_allow_chain_relink =1 ; status =ocfs2_search_chain (ac, handle, bits_wanted, min_bits, res, &bits_left);
@@ -1947,7 +1946,7 @@ static int ocfs2_claim_suballoc_bits(struct ocfs2_alloc_context *ac,* searching each chain in order. Don't allow chain relinking * because we only calculate enough journal credits for one * relink per alloc. */ - ac->ac_allow_chain_relink =0 ; + ac->ac_disable_chain_relink =1 ;for (i =0 ; i <le16_to_cpu (cl->cl_next_free_rec); i ++) {if (i == victim)continue ;
fs/ocfs2/suballoc.h +1 -1
@@ -49,7 +49,7 @@ struct ocfs2_alloc_context {/* these are used by the chain search */ u16 ac_chain; -int ac_allow_chain_relink; +int ac_disable_chain_relink;group_search_t *ac_group_search;u64 ac_last_group;
fs/ocfs2/xattr.c +1 -1
@@ -7189,7 +7189,7 @@ int ocfs2_init_security_and_acl(struct inode *dir,struct buffer_head *dir_bh =NULL ; ret =ocfs2_init_security_get (inode, dir, qstr,NULL ); -if (!ret) { +if (ret) {mlog_errno (ret); goto leave; }
fs/pstore/platform.c +29 -6
@@ -88,6 +88,27 @@ static const char *get_reason_str(enum kmsg_dump_reason reason) } } +bool pstore_cannot_block_path (enum kmsg_dump_reason reason) +{ +/* +* In case of NMI path, pstore shouldn't be blocked +* regardless of reason. +*/ +if (in_nmi ()) +return true; + +switch (reason) { +/* In panic case, other cpus are stopped by smp_send_stop(). */ +case KMSG_DUMP_PANIC : +/* Emergency restart shouldn't be blocked by spin lock. */ +case KMSG_DUMP_EMERG : +return true; +default : +return false; + } +} +EXPORT_SYMBOL_GPL (pstore_cannot_block_path); +/* * callback from kmsg_dump. (s2,l2) has the most recently * written bytes, older bytes are in (s1,l1). Save as much
@@ -111,10 +132,12 @@ static void pstore_dump(struct kmsg_dumper *dumper, why =get_reason_str (reason); -if (in_nmi ()) { - is_locked =spin_trylock (&psinfo->buf_lock); -if (!is_locked) -pr_err ("pstore dump routine blocked in NMI, may corrupt error record\n" ); +if (pstore_cannot_block_path (reason)) { + is_locked =spin_trylock_irqsave (&psinfo->buf_lock, flags); +if (!is_locked) { +pr_err ("pstore dump routine blocked in %s path, may corrupt error record\n" + ,in_nmi () ?"NMI" : why); + } }else spin_lock_irqsave (&psinfo->buf_lock, flags); oopscount++;
@@ -145,9 +168,9 @@ static void pstore_dump(struct kmsg_dumper *dumper, total += l1_cpy + l2_cpy; part++; } -if (in_nmi ()) { +if (pstore_cannot_block_path (reason)) {if (is_locked) -spin_unlock (&psinfo->buf_lock); +spin_unlock_irqrestore (&psinfo->buf_lock, flags); }else spin_unlock_irqrestore (&psinfo->buf_lock, flags); }
include/linux/auto_fs.h +8 -17
@@ -31,25 +31,16 @@#define AUTOFS_MIN_PROTO_VERSION AUTOFS_PROTO_VERSION/* -* Architectures where both 32- and 64-bit binaries can be executed -* on 64-bit kernels need this. This keeps the structure format -* uniform, and makes sure the wait_queue_token isn't too big to be -* passed back down to the kernel. -* -* This assumes that on these architectures: -* mode 32 bit 64 bit -* ------------------------- -* int 32 bit 32 bit -* long 32 bit 64 bit -* -* If so, 32-bit user-space code should be backwards compatible. +* The wait_queue_token (autofs_wqt_t) is part of a structure which is passed +* back to the kernel via ioctl from userspace. On architectures where 32- and +* 64-bit userspace binaries can be executed it's important that the size of +* autofs_wqt_t stays constant between 32- and 64-bit Linux kernels so that we +* do not break the binary ABI interface by changing the structure size. */ - -#if defined(__sparc__) || defined(__mips__) || defined(__x86_64__) \ - || defined(__powerpc__) || defined(__s390__) -typedef unsigned int autofs_wqt_t ; -#else +#if defined(__ia64__) || defined(__alpha__)/* pure 64bit architectures */ typedef unsigned long autofs_wqt_t ; +#else +typedef unsigned int autofs_wqt_t ;#endif /* Packet types */
include/linux/pstore.h +6 -0
@@ -54,12 +54,18 @@ struct pstore_info {#ifdef CONFIG_PSTORE extern int pstore_register (struct pstore_info *); +extern bool pstore_cannot_block_path (enum kmsg_dump_reason reason);#else static inline int pstore_register (struct pstore_info *psi) {return -ENODEV ; } +static inline bool +pstore_cannot_block_path (enum kmsg_dump_reason reason) +{ +return false; +}#endif #endif /*_LINUX_PSTORE_H*/
include/linux/quota.h +1 -0
@@ -417,6 +417,7 @@ struct quota_module_name {#define INIT_QUOTA_MODULE_NAMES {\ {QFMT_VFS_OLD, "quota_v1"},\ {QFMT_VFS_V0, "quota_v2"},\ + {QFMT_VFS_V1, "quota_v2"},\ {0, NULL}}#endif /* __KERNEL__ */
kernel/cgroup.c +8 -0
@@ -378,12 +378,20 @@ static void __put_css_set(struct css_set *cg, int taskexit)struct cgroup *cgrp = link->cgrp;list_del (&link->cg_link_list);list_del (&link->cgrp_link_list); + +/* +* We may not be holding cgroup_mutex, and if cgrp->count is +* dropped to 0 the cgroup can be destroyed at any time, hence +* rcu_read_lock is used to keep it alive. +*/ +rcu_read_lock ();if (atomic_dec_and_test (&cgrp->count) &¬ify_on_release (cgrp)) {if (taskexit)set_bit (CGRP_RELEASABLE , &cgrp->flags);check_for_release (cgrp); } +rcu_read_unlock ();kfree (link); }
kernel/cpuset.c +10 -2
@@ -2479,8 +2479,16 @@ void cpuset_print_task_mems_allowed(struct task_struct *tsk) dentry =task_cs (tsk)->css.cgroup->dentry;spin_lock (&cpuset_buffer_lock); -snprintf (cpuset_name,CPUSET_NAME_LEN , - dentry ? (const char *)dentry->d_name.name :"/" ); + +if (!dentry) { +strcpy (cpuset_name,"/" ); + }else { +spin_lock (&dentry->d_lock); +strlcpy (cpuset_name, (const char *)dentry->d_name.name, +CPUSET_NAME_LEN ); +spin_unlock (&dentry->d_lock); + } +nodelist_scnprintf (cpuset_nodelist,CPUSET_NODELIST_LEN , tsk->mems_allowed); printk(KERN_INFO "%s cpuset=%s mems_allowed=%s\n",
kernel/posix-timers.c +7 -0
@@ -639,6 +639,13 @@ static struct k_itimer *__lock_timer(timer_t timer_id, unsigned long *flags) {struct k_itimer *timr; +/* +* timer_t could be any type >= int and we want to make sure any +* @timer_id outside positive int range fails lookup. +*/ +if ((unsigned long long )timer_id >INT_MAX ) +return NULL ; +rcu_read_lock (); timr =idr_find (&posix_timers_id, (int )timer_id);if (timr) {
kernel/sysctl_binary.c +2 -1
@@ -1194,9 +1194,10 @@ static ssize_t bin_dn_node_address(struct file *file,/* Convert the decnet address to binary */ result = -EIO ; - nodep =strchr (buf,'.' ) +1 ; + nodep =strchr (buf,'.' );if (!nodep) goto out; + ++nodep; area =simple_strtoul (buf,NULL ,10 ); node =simple_strtoul (nodep,NULL ,10 );
kernel/trace/ftrace.c +32 -14
78 lines not on this page · raw message
lib/idr.c +8 -1
@@ -625,7 +625,14 @@ void *idr_get_next(struct idr *idp, int *nextidp)return p; } - id +=1 << n; +/* +* Proceed to the next layer at the current level. Unlike +* idr_for_each(), @id isn't guaranteed to be aligned to +* layer boundary at this point and adding 1 << n may +* incorrectly skip IDs. Make sure we jump to the +* beginning of the next layer using round_up(). +*/ + id =round_up (id +1 ,1 << n);while (n <fls (id)) { n +=IDR_BITS ; p = *--paa;
net/sunrpc/svc_xprt.c +2 -13
@@ -817,7 +817,6 @@ static void svc_age_temp_xprts(unsigned long closure)struct svc_serv *serv = (struct svc_serv *)closure;struct svc_xprt *xprt;struct list_head *le, *next; -LIST_HEAD (to_be_aged);dprintk ("svc_age_temp_xprts\n" );
@@ -838,25 +837,15 @@ static void svc_age_temp_xprts(unsigned long closure)if (atomic_read (&xprt->xpt_ref.refcount) >1 ||test_bit (XPT_BUSY , &xprt->xpt_flags))continue ; -svc_xprt_get (xprt); -list_move (le, &to_be_aged); +list_del_init (le);set_bit (XPT_CLOSE , &xprt->xpt_flags);set_bit (XPT_DETACHED , &xprt->xpt_flags); - } -spin_unlock_bh (&serv->sv_lock); - -while (!list_empty (&to_be_aged)) { - le = to_be_aged.next; -/* fiddling the xpt_list node is safe 'cos we're XPT_DETACHED */ -list_del_init (le); - xprt = list_entry(le, struct svc_xprt, xpt_list); -dprintk ("queuing xprt %p for closing\n" , xprt);/* a thread will dequeue and close it soon */ svc_xprt_enqueue (xprt); -svc_xprt_put (xprt); } +spin_unlock_bh (&serv->sv_lock);mod_timer (&serv->sv_temptimer, jiffies + svc_conn_age_period *HZ ); }
sound/pci/hda/patch_hdmi.c +3 -0
@@ -1244,6 +1244,9 @@ 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 ); }
tools/perf/Makefile +2 -2
@@ -241,13 +241,13 @@ $(OUTPUT)util/parse-events-flex.c: util/parse-events.l $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/parse-events-flex.h -t util/parse-events.l > $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c: util/parse-events.y - $(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c + $(QUIET_BISON)$(BISON) -v util/parse-events.y -d -o $(OUTPUT)util/parse-events-bison.c -p parse_events_ $(OUTPUT)util/pmu-flex.c: util/pmu.l $(QUIET_FLEX)$(FLEX) --header-file=$(OUTPUT)util/pmu-flex.h -t util/pmu.l > $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c: util/pmu.y - $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c + $(QUIET_BISON)$(BISON) -v util/pmu.y -d -o $(OUTPUT)util/pmu-bison.c -p perf_pmu_ $(OUTPUT)util/parse-events.o: $(OUTPUT)util/parse-events-flex.c $(OUTPUT)util/parse-events-bison.c $(OUTPUT)util/pmu.o: $(OUTPUT)util/pmu-flex.c $(OUTPUT)util/pmu-bison.c
tools/perf/util/parse-events.y +0 -1
@@ -1,5 +1,4 @@ -%name-prefix "parse_events_" %parse-param {struct list_head *list_all} %parse-param {struct list_head *list_event} %parse-param {int *idx}
tools/perf/util/pmu.y +0 -1
@@ -1,5 +1,4 @@ -%name-prefix "perf_pmu_" %parse-param {struct list_head *format} %parse-param {char *name}