Linux 3.2.76
I'm announcing the release of the 3.2.76 kernel.
All users of the 3.2 kernel series should upgrade.
The updated 3.2.y git tree can be found at:
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.2.y and can be browsed at the normal kernel.org git web browser:
https://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git
The diff from 3.2.75 is attached to this message.
Ben.
------------
Documentation/i2c/busses/i2c-i801 | 11 +++
Makefile | 2 +- arch/mips/kernel/scall32-o32.S | 1 + arch/mips/kernel/scall64-o32.S | 1 + arch/parisc/kernel/signal.c | 64 ++++++++++--- arch/s390/kernel/dis.c | 15 +++- arch/x86/kvm/i8254.c | 1 + arch/x86/kvm/x86.c | 10 ++- crypto/ablkcipher.c | 2 +- crypto/blkcipher.c | 2 +- drivers/ata/ahci.c | 20 ++++- drivers/block/xen-blkback/common.h | 8 +- drivers/cdrom/cdrom.c | 1 + drivers/gpu/drm/radeon/radeon_irq_kms.c | 5 ++ drivers/hid/hid-dr.c | 58 ++++++++++++ drivers/i2c/busses/Kconfig | 11 +++ drivers/i2c/busses/i2c-i801.c | 154 +++++++++++++++++++++----------- drivers/isdn/gigaset/ser-gigaset.c | 10 ++- drivers/isdn/hardware/mISDN/mISDNipac.c | 7 +- drivers/net/ethernet/renesas/sh_eth.c | 3 +- drivers/net/xen-netback/netback.c | 34 ++++--- drivers/scsi/ses.c | 30 ++++++- drivers/spi/spi.c | 2 +- drivers/tty/tty_buffer.c | 8 +- drivers/usb/core/hub.c | 24 ++++- drivers/usb/serial/ipaq.c | 3 +- drivers/video/fsl-diu-fb.c | 13 ++- drivers/xen/xen-pciback/pciback.h | 1 + drivers/xen/xen-pciback/pciback_ops.c | 75 ++++++++++++---- fs/ocfs2/resize.c | 15 +++- include/linux/enclosure.h | 4 + include/linux/skbuff.h | 3 +- include/net/sctp/structs.h | 3 +- include/net/sock.h | 2 +- include/sound/tlv.h | 24 +++-- include/xen/interface/io/ring.h | 14 +++ kernel/irq/manage.c | 6 +- mm/memory_hotplug.c | 31 ++++---
mm/vmstat.c | 3 +- net/core/datagram.c | 6 +-
net/core/dev.c | 5 +-
net/core/dst.c | 3 +- net/ipv4/tcp_input.c | 2 +-
net/ipv4/udp.c | 8 +- net/ipv6/addrlabel.c | 2 +-
net/ipv6/raw.c | 2 +-
net/ipv6/udp.c | 9 +- net/rfkill/core.c | 6 +- net/rxrpc/ar-recvmsg.c | 3 +-
net/sctp/ipv6.c | 3 +- net/sctp/outqueue.c | 1 + net/sctp/sm_statefuns.c | 3 +- scripts/recordmcount.c | 137 +++++++++++++++++++++++----- security/keys/keyctl.c | 18 ++-- sound/usb/mixer.c | 2 + sound/usb/mixer_maps.c | 12 --- sound/usb/mixer_quirks.c | 37 ++++++++ sound/usb/mixer_quirks.h | 4 +
58 files changed, 709 insertions(+), 235 deletions(-)
Alan Cox (1):
i2c: i801: Add PCI ID for Intel Braswell
Alan Stern (1):
USB: fix invalid memory access in hub_activate()
Alexandra Yates (3):
ahci: add new Intel device IDs
ahci: Order SATA device IDs for codename Lewisburg
i2c: i801: add Intel Lewisburg device IDs
Andrew Banman (1):
mm/memory_hotplug.c: check for missing sections in test_pages_in_a_zone()
Andrew Honig (1):
KVM: x86: Reload pit counters for all channels when restoring state
Andrey Ryabinin (1):
ipv6/addrlabel: fix ip6addrlbl_get()
Anssi Hannula (1):
ALSA: usb-audio: Add a more accurate volume quirk for AudioQuest DragonFly
Ben Hutchings (3):
Revert "net: add length argument to skb_copy_and_csum_datagram_iovec"
ahci: Add JMicron 362 device IDs
Linux 3.2.76
[email protected] (1):
ahci: Add Device ID for Intel Sunrise Point PCH
Chew, Kean ho (1):
i2c: i801: enable Intel BayTrail SMBUS
Clemens Ladisch (2):
ALSA: tlv: compute TLV_*_ITEM lengths automatically
ALSA: tlv: add DECLARE_TLV_DB_RANGE()
Colin Ian King (1):
ftrace/scripts: Fix incorrect use of sprintf in recordmcount
Dan Carpenter (2):
mISDN: fix a loop count
USB: ipaq.c: fix a timeout loop
Dave Airlie (1):
drm/radeon: fix hotplug race at startup
David Howells (1):
KEYS: Fix race between read and revoke
David Vrabel (3):
xen: Add RING_COPY_REQUEST()
xen-netback: don't use last request to determine minimum Tx credit
xen-netback: use RING_COPY_REQUEST() throughout
Devin Ryles (1):
i2c: i801: Add DeviceIDs for SunrisePoint LP
Ed Swierk (1):
MIPS: Fix restart of indirect syscalls
Eric Dumazet (2):
ipv6: sctp: fix lockdep splat in sctp_v6_get_dst()
udp: properly support MSG_PEEK with truncated buffers
Francesco Ruggeri (1):
net: possible use after free in dst_release
Georgios Toptsidis (1):
cdrom: Random writing support for BD-RE media
Hannes Frederic Sowa (1):
net: fix warnings in 'make htmldocs' by moving macro definition out of field declaration
Helge Deller (1):
parisc: Fix syscall restarts
James Bottomley (2):
ses: Fix problems with simple enclosures
ses: fix additional element traversal bug
James Ralston (4):
ahci: Add Device IDs for Intel Wellsburg PCH
ahci: Remove Device ID for Intel Sunrise Point PCH
i2c: i801: Add Device IDs for Intel Wellsburg PCH
i2c: i801: Add Device IDs for Intel Wildcat Point-LP PCH
Jarkko Nikula (2):
i2c: i801: Add support for Intel Broxton
i2c: i801: Document Intel DNV and Broxton
Jason A. Donenfeld (1):
crypto: skcipher - Copy iv from desc even for 0-len walks
Jean Delvare (2):
i2c: i801: Fix the alignment of the device table
i2c: i801: Add device ID for Intel Wildcat Point PCH
Johan Hovold (1):
spi: fix parent-device reference leak
Johannes Berg (1):
rfkill: copy the name into the rfkill struct
Johannes Thumshirn (1):
ahci: Add Marvell 88se91a2 device id
Joseph Qi (1):
ocfs2: fix BUG when calculate new backup super
Konrad Rzeszutek Wilk (6):
xen/pciback: Save xen_pci_op commands before processing it
xen/pciback: Return error on XEN_PCI_OP_enable_msi when device has MSI or MSI-X enabled xen/pciback: Return error on XEN_PCI_OP_enable_msix when device has MSI or MSI-X enabled xen/pciback: Do not install an IRQ handler for MSI interrupts. xen/pciback: For XEN_PCI_OP_disable_msi[|x] only disable if device has MSI(X) enabled. xen/pciback: Don't allow MSI-X ops if PCI_COMMAND_MEMORY is not set.
Maciej Zuk (1):
HID: dragonrise: fix HID Descriptor for 0x0006 PID
Michael Holzheu (1):
s390/dis: Fix handling of format specifiers
Michal Hocko (1):
vmstat: allocate vmstat_wq before it is used
Mika Westerberg (1):
i2c: i801: Add support for Intel DNV
Nikolay Aleksandrov (1):
net/core: revert "net: fix __netdev_update_features return.." and add comment
Paolo Bonzini (1):
kvm: x86: only channel 0 of the i8254 is linked to the HPET
Peter Hurley (1):
tty: Fix GPF in flush_to_ldisc()
Roger Pau Monné (1):
xen-blkback: only read request operation from shared ring once
Russell King (1):
scripts: recordmcount: break hardlinks
Sergei Shtylyov (1):
sh_eth: fix TX buffer byte-swapping
Seth Heasley (2):
i2c: i801: SMBus patch for Intel Avoton DeviceIDs
i2c: i801: SMBus patch for Intel Coleto Creek DeviceIDs
Steven Rostedt (Red Hat) (1):
ftrace/scripts: Have recordmcount copy the object file
Thomas Gleixner (1):
genirq: Prevent chip buslock deadlock
Tilman Schmidt (1):
ser_gigaset: fix deallocation of platform device structure
Wang Dongsheng (1):
video: fbdev: fsl: Fix kernel crash when diu_ops is not implemented
[email protected] (1):
i2c: i801: Add Device IDs for Intel Sunrise Point PCH
lucien (1):
sctp: start t5 timer only when peer rwnd is 0 and local state is SHUTDOWN_PENDING
Signature · 3 lines
Ben Hutchings
Life is what happens to you while you're busy making other plans.
- John LennonDocumentation/i2c/busses/i2c-i801 +11 -0
@@ -22,6 +22,17 @@ Supported adapters: * Intel Panther Point (PCH) * Intel Lynx Point (PCH) * Intel Lynx Point-LP (PCH) + * Intel Avoton (SOC) + * Intel Wellsburg (PCH) + * Intel Coleto Creek (PCH) + * Intel Wildcat Point (PCH) + * Intel Wildcat Point-LP (PCH) + * Intel BayTrail (SOC) + * Intel Sunrise Point-H (PCH) + * Intel Sunrise Point-LP (PCH) + * Intel DNV (SOC) + * Intel Broxton (SOC) + * Intel Lewisburg (PCH) Datasheets: Publicly available at the Intel website On Intel Patsburg and later chipsets, both the normal host SMBus controller
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 2 -SUBLEVEL = 75 +SUBLEVEL = 76 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/mips/kernel/scall32-o32.S +1 -0
@@ -192,6 +192,7 @@ illegal_syscall: sll t1, t0, 3 beqz v0, einval lw t2, sys_call_table(t1) # syscall routine + sw a0, PT_R2(sp) # call routine directly on restart /* Some syscalls like execve get their arguments from struct pt_regs and claim zero arguments in the syscall table. Thus we have to
arch/mips/kernel/scall64-o32.S +1 -0
@@ -180,6 +180,7 @@ LEAF(sys32_syscall) dsll t1, t0, 3 beqz v0, einval ld t2, sys_call_table(t1) # syscall routine + sd a0, PT_R2(sp) # call routine directly on restart move a0, a1 # shift argument registers move a1, a2
arch/parisc/kernel/signal.c +52 -12
86 lines not on this page · raw message
arch/s390/kernel/dis.c +11 -4
@@ -1503,14 +1503,21 @@ static int print_insn(char *buffer, unsigned char *code, unsigned long addr) }if (separator) ptr +=sprintf (ptr,"%c" , separator); +/* +* Use four '%' characters below because of the +* following two conversions: +* +* 1) sprintf: %%%%r -> %%r +* 2) printk : %%r -> %r +*/ if (operand->flags &OPERAND_GPR ) - ptr +=sprintf (ptr,"%%r%i" , value); + ptr +=sprintf (ptr,"%%%%r%i" , value);else if (operand->flags &OPERAND_FPR ) - ptr +=sprintf (ptr,"%%f%i" , value); + ptr +=sprintf (ptr,"%%%%f%i" , value);else if (operand->flags &OPERAND_AR ) - ptr +=sprintf (ptr,"%%a%i" , value); + ptr +=sprintf (ptr,"%%%%a%i" , value);else if (operand->flags &OPERAND_CR ) - ptr +=sprintf (ptr,"%%c%i" , value); + ptr +=sprintf (ptr,"%%%%c%i" , value);else if (operand->flags &OPERAND_PCREL ) ptr +=sprintf (ptr,"%lx" , (signed int ) value + addr);
arch/x86/kvm/i8254.c +1 -0
@@ -437,6 +437,7 @@ void kvm_pit_load_count(struct kvm *kvm, int channel, u32 val, int hpet_legacy_su8 saved_mode;if (hpet_legacy_start) {/* save existing mode for later reenablement */ +WARN_ON (channel !=0 ); saved_mode = kvm->arch.vpit->pit_state.channels[0 ].mode; kvm->arch.vpit->pit_state.channels[0 ].mode =0xff ;/* disable timer */ pit_load_count (kvm, channel, val);
arch/x86/kvm/x86.c +7 -3
@@ -3434,10 +3434,11 @@ static int kvm_vm_ioctl_get_pit(struct kvm *kvm, struct kvm_pit_state *ps)static int kvm_vm_ioctl_set_pit (struct kvm *kvm,struct kvm_pit_state *ps) {int r =0 ; - +int i;mutex_lock (&kvm->arch.vpit->pit_state.lock);memcpy (&kvm->arch.vpit->pit_state, ps,sizeof (struct kvm_pit_state )); -kvm_pit_load_count (kvm,0 , ps->channels[0 ].count,0 ); +for (i =0 ; i <3 ; i++) +kvm_pit_load_count (kvm, i, ps->channels[i].count,0 );mutex_unlock (&kvm->arch.vpit->pit_state.lock);return r; }
@@ -3458,6 +3459,7 @@ static int kvm_vm_ioctl_get_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)static int kvm_vm_ioctl_set_pit2 (struct kvm *kvm,struct kvm_pit_state2 *ps) {int r =0 , start =0 ; +int i;u32 prev_legacy, cur_legacy;mutex_lock (&kvm->arch.vpit->pit_state.lock); prev_legacy = kvm->arch.vpit->pit_state.flags &KVM_PIT_FLAGS_HPET_LEGACY ;
@@ -3467,7 +3469,9 @@ static int kvm_vm_ioctl_set_pit2(struct kvm *kvm, struct kvm_pit_state2 *ps)memcpy (&kvm->arch.vpit->pit_state.channels, &ps->channels,sizeof (kvm->arch.vpit->pit_state.channels)); kvm->arch.vpit->pit_state.flags = ps->flags; -kvm_pit_load_count (kvm,0 , kvm->arch.vpit->pit_state.channels[0 ].count, start); +for (i =0 ; i <3 ; i++) +kvm_pit_load_count (kvm, i, kvm->arch.vpit->pit_state.channels[i].count, + start && i ==0 );mutex_unlock (&kvm->arch.vpit->pit_state.lock);return r; }
crypto/ablkcipher.c +1 -1
@@ -280,12 +280,12 @@ static int ablkcipher_walk_first(struct ablkcipher_request *req,if (WARN_ON_ONCE (in_irq ()))return -EDEADLK ; + walk->iv = req->info; walk->nbytes = walk->total;if (unlikely (!walk->total))return 0 ; walk->iv_buffer =NULL ; - walk->iv = req->info;if (unlikely (((unsigned long )walk->iv & alignmask))) {int err =ablkcipher_copy_iv (walk, tfm, alignmask);if (err)
crypto/blkcipher.c +1 -1
@@ -329,12 +329,12 @@ static int blkcipher_walk_first(struct blkcipher_desc *desc,if (WARN_ON_ONCE (in_irq ()))return -EDEADLK ; + walk->iv = desc->info; walk->nbytes = walk->total;if (unlikely (!walk->total))return 0 ; walk->buffer =NULL ; - walk->iv = desc->info;if (unlikely (((unsigned long )walk->iv & alignmask))) {int err =blkcipher_copy_iv (walk, tfm, alignmask);if (err)
drivers/ata/ahci.c +19 -1
@@ -324,6 +324,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(INTEL, 0x1f37), board_ahci_avn }, /* Avoton RAID */ { PCI_VDEVICE(INTEL, 0x1f3e), board_ahci_avn }, /* Avoton RAID */ { PCI_VDEVICE(INTEL, 0x1f3f), board_ahci_avn }, /* Avoton RAID */ + { PCI_VDEVICE(INTEL, 0x2823), board_ahci }, /* Wellsburg RAID */ + { PCI_VDEVICE(INTEL, 0x2827), board_ahci }, /* Wellsburg RAID */ { PCI_VDEVICE(INTEL, 0x8d02), board_ahci }, /* Wellsburg AHCI */ { PCI_VDEVICE(INTEL, 0x8d04), board_ahci }, /* Wellsburg RAID */ { PCI_VDEVICE(INTEL, 0x8d06), board_ahci }, /* Wellsburg RAID */
@@ -348,15 +350,29 @@ static const struct pci_device_id ahci_pci_tbl[] = { { PCI_VDEVICE(INTEL, 0x9d03), board_ahci }, /* Sunrise Point-LP AHCI */ { PCI_VDEVICE(INTEL, 0x9d05), board_ahci }, /* Sunrise Point-LP RAID */ { PCI_VDEVICE(INTEL, 0x9d07), board_ahci }, /* Sunrise Point-LP RAID */ + { PCI_VDEVICE(INTEL, 0xa102), board_ahci }, /* Sunrise Point-H AHCI */ { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H AHCI */ - { PCI_VDEVICE(INTEL, 0xa103), board_ahci }, /* Sunrise Point-H RAID */ { PCI_VDEVICE(INTEL, 0xa105), board_ahci }, /* Sunrise Point-H RAID */ + { PCI_VDEVICE(INTEL, 0xa106), board_ahci }, /* Sunrise Point-H RAID */ { PCI_VDEVICE(INTEL, 0xa107), board_ahci }, /* Sunrise Point-H RAID */ { PCI_VDEVICE(INTEL, 0xa10f), board_ahci }, /* Sunrise Point-H RAID */ + { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0x2826), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa182), board_ahci }, /* Lewisburg AHCI*/ + { PCI_VDEVICE(INTEL, 0xa184), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa186), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa18e), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa202), board_ahci }, /* Lewisburg AHCI*/ + { PCI_VDEVICE(INTEL, 0xa204), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa206), board_ahci }, /* Lewisburg RAID*/ + { PCI_VDEVICE(INTEL, 0xa20e), board_ahci }, /* Lewisburg RAID*//* JMicron 360/1/3/5/6, match class to avoid IDE function */ { PCI_VENDOR_ID_JMICRON, PCI_ANY_ID, PCI_ANY_ID, PCI_ANY_ID, PCI_CLASS_STORAGE_SATA_AHCI, 0xffffff, board_ahci_ign_iferr }, +/* JMicron 362B and 362C have an AHCI function with IDE class code */ + { PCI_VDEVICE(JMICRON, 0x2362), board_ahci_ign_iferr }, + { PCI_VDEVICE(JMICRON, 0x236f), board_ahci_ign_iferr },/* ATI */ { PCI_VDEVICE(ATI, 0x4380), board_ahci_sb600 }, /* ATI SB600 */
@@ -494,6 +510,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a0), .driver_data = board_ahci_yes_fbs }, + { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a2), /* 88se91a2 */ + .driver_data = board_ahci_yes_fbs }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x91a3), .driver_data = board_ahci_yes_fbs }, { PCI_DEVICE(PCI_VENDOR_ID_MARVELL_EXT, 0x9230),
drivers/block/xen-blkback/common.h +4 -4
@@ -238,11 +238,11 @@ static inline void blkif_get_x86_32_req(struct blkif_request *dst, struct blkif_x86_32_request *src) {int i, n =BLKIF_MAX_SEGMENTS_PER_REQUEST ; - dst->operation = src->operation; + dst->operation =ACCESS_ONCE (src->operation); dst->nr_segments = src->nr_segments; dst->handle = src->handle; dst->id = src->id; -switch (src->operation) { +switch (dst->operation) {case BLKIF_OP_READ :case BLKIF_OP_WRITE :case BLKIF_OP_WRITE_BARRIER :
@@ -267,11 +267,11 @@ static inline void blkif_get_x86_64_req(struct blkif_request *dst, struct blkif_x86_64_request *src) {int i, n =BLKIF_MAX_SEGMENTS_PER_REQUEST ; - dst->operation = src->operation; + dst->operation =ACCESS_ONCE (src->operation); dst->nr_segments = src->nr_segments; dst->handle = src->handle; dst->id = src->id; -switch (src->operation) { +switch (dst->operation) {case BLKIF_OP_READ :case BLKIF_OP_WRITE :case BLKIF_OP_WRITE_BARRIER :
drivers/cdrom/cdrom.c +1 -0
@@ -873,6 +873,7 @@ static int cdrom_is_dvd_rw(struct cdrom_device_info *cdi)switch (cdi->mmc3_profile) {case 0x12 :/* DVD-RAM */ case 0x1A :/* DVD+RW */ +case 0x43 :/* BD-RE */ return 0 ;default :return 1 ;
drivers/gpu/drm/radeon/radeon_irq_kms.c +5 -0
@@ -51,6 +51,11 @@ static void radeon_hotplug_work_func(struct work_struct *work)struct drm_mode_config *mode_config = &dev->mode_config;struct drm_connector *connector; +/* we can race here at startup, some boards seem to trigger +* hotplug irqs when they shouldn't. */ +if (!rdev->mode_info.mode_config_initialized) +return ; +mutex_lock (&mode_config->mutex);if (mode_config->num_connector) {list_for_each_entry (connector, &mode_config->connector_list, head)
drivers/hid/hid-dr.c +58 -0
70 lines not on this page · raw message
drivers/i2c/busses/Kconfig +11 -0
@@ -105,6 +105,17 @@ config I2C_I801 Panther Point (PCH) Lynx Point (PCH) Lynx Point-LP (PCH) + Avoton (SOC) + Wellsburg (PCH) + Coleto Creek (PCH) + Wildcat Point (PCH) + Wildcat Point-LP (PCH) + BayTrail (SOC) + Sunrise Point-H (PCH) + Sunrise Point-LP (PCH) + DNV (SOC) + Broxton (SOC) + Lewisburg (PCH) This driver can also be built as a module. If so, the module will be called i2c-i801.
drivers/i2c/busses/i2c-i801.c +102 -52
179 lines not on this page · raw message
drivers/isdn/gigaset/ser-gigaset.c +7 -3
@@ -371,19 +371,23 @@ static void gigaset_freecshw(struct cardstate *cs)tasklet_kill (&cs->write_tasklet);if (!cs->hw.ser)return ; -dev_set_drvdata (&cs->hw.ser->dev.dev,NULL );platform_device_unregister (&cs->hw.ser->dev); -kfree (cs->hw.ser); - cs->hw.ser =NULL ; }static void gigaset_device_release (struct device *dev) {struct platform_device *pdev =to_platform_device (dev); +struct cardstate *cs =dev_get_drvdata (dev);/* adapted from platform_device_release() in drivers/base/platform.c */ kfree (dev->platform_data);kfree (pdev->resource); + +if (!cs) +return ; +dev_set_drvdata (dev,NULL ); +kfree (cs->hw.ser); + cs->hw.ser =NULL ; }/*
drivers/isdn/hardware/mISDN/mISDNipac.c +3 -4
@@ -1156,7 +1156,7 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop)if (ipac->type &IPAC_TYPE_IPACX ) { ista =ReadIPAC (ipac,ISACX_ISTA ); -while (ista && cnt--) { +while (ista && --cnt) {pr_debug ("%s: ISTA %02x\n" , ipac->name, ista);if (ista &IPACX__ICA )ipac_irq (&ipac->hscx[0 ], ista);
@@ -1168,7 +1168,7 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) } }else if (ipac->type &IPAC_TYPE_IPAC ) { ista =ReadIPAC (ipac,IPAC_ISTA ); -while (ista && cnt--) { +while (ista && --cnt) {pr_debug ("%s: ISTA %02x\n" , ipac->name, ista);if (ista & (IPAC__ICD |IPAC__EXD )) { istad =ReadISAC (isac,ISAC_ISTA );
@@ -1186,7 +1186,7 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop) ista =ReadIPAC (ipac,IPAC_ISTA ); } }else if (ipac->type &IPAC_TYPE_HSCX ) { -while (cnt) { +while (--cnt) { ista =ReadIPAC (ipac,IPAC_ISTAB + ipac->hscx[1 ].off);pr_debug ("%s: B2 ISTA %02x\n" , ipac->name, ista);if (ista)
@@ -1197,7 +1197,6 @@ mISDNipac_irq(struct ipac_hw *ipac, int maxloop)mISDNisac_irq (isac, istad);if (0 == (ista | istad))break ; - cnt--; } }if (cnt > maxloop)/* only for ISAC/HSCX without PCI IRQ test */
drivers/net/ethernet/renesas/sh_eth.c +1 -2
@@ -1499,8 +1499,7 @@ static int sh_eth_start_xmit(struct sk_buff *skb, struct net_device *ndev) txdesc = &mdp->tx_ring[entry];/* soft swap. */ if (!mdp->cd->hw_swap) -sh_eth_soft_swap (phys_to_virt (ALIGN (txdesc->addr,4 )), - skb->len +2 ); +sh_eth_soft_swap (PTR_ALIGN (skb->data,4 ), skb->len +2 ); txdesc->addr =dma_map_single (&ndev->dev, skb->data, skb->len,DMA_TO_DEVICE );if (skb->len <ETHERSMALL )
drivers/net/xen-netback/netback.c +15 -19
@@ -406,17 +406,17 @@ static struct netbk_rx_meta *get_next_rx_buffer(struct xenvif *vif, struct netrx_pending_operations *npo) {struct netbk_rx_meta *meta; -struct xen_netif_rx_request *req; +struct xen_netif_rx_request req; - req =RING_GET_REQUEST (&vif->rx, vif->rx.req_cons++); +RING_COPY_REQUEST (&vif->rx, vif->rx.req_cons++, &req); meta = npo->meta + npo->meta_prod++; meta->gso_size =0 ; meta->size =0 ; - meta->id = req->id; + meta->id = req.id; npo->copy_off =0 ; - npo->copy_gref = req->gref; + npo->copy_gref = req.gref;return meta; }
@@ -518,7 +518,7 @@ static int netbk_gop_skb(struct sk_buff *skb,struct xenvif *vif =netdev_priv (skb->dev);int nr_frags =skb_shinfo (skb)->nr_frags;int i; -struct xen_netif_rx_request *req; +struct xen_netif_rx_request req;struct netbk_rx_meta *meta;unsigned char *data;int head =1 ;
@@ -528,14 +528,14 @@ static int netbk_gop_skb(struct sk_buff *skb,/* Set up a GSO prefix descriptor, if necessary */ if (skb_shinfo (skb)->gso_size && vif->gso_prefix) { - req =RING_GET_REQUEST (&vif->rx, vif->rx.req_cons++); +RING_COPY_REQUEST (&vif->rx, vif->rx.req_cons++, &req); meta = npo->meta + npo->meta_prod++; meta->gso_size =skb_shinfo (skb)->gso_size; meta->size =0 ; - meta->id = req->id; + meta->id = req.id; } - req =RING_GET_REQUEST (&vif->rx, vif->rx.req_cons++); +RING_COPY_REQUEST (&vif->rx, vif->rx.req_cons++, &req); meta = npo->meta + npo->meta_prod++;if (!vif->gso_prefix)
@@ -544,9 +544,9 @@ static int netbk_gop_skb(struct sk_buff *skb, meta->gso_size =0 ; meta->size =0 ; - meta->id = req->id; + meta->id = req.id; npo->copy_off =0 ; - npo->copy_gref = req->gref; + npo->copy_gref = req.gref; data = skb->data;while (data <skb_tail_pointer (skb)) {
@@ -864,9 +864,7 @@ static void tx_add_credit(struct xenvif *vif)* Allow a burst big enough to transmit a jumbo packet of up to 128kB. * Otherwise the interface can seize up due to insufficient credit. */ - max_burst =RING_GET_REQUEST (&vif->tx, vif->tx.req_cons)->size; - max_burst =min (max_burst,131072UL ); - max_burst =max (max_burst, vif->credit_bytes); + max_burst =max (131072UL , vif->credit_bytes);/* Take care that adding a new chunk of credit doesn't wrap to zero. */ max_credit = vif->remaining_credit + vif->credit_bytes;
@@ -892,7 +890,7 @@ static void netbk_tx_err(struct xenvif *vif,make_tx_response (vif, txp,XEN_NETIF_RSP_ERROR );if (cons == end)break ; - txp =RING_GET_REQUEST (&vif->tx, cons++); +RING_COPY_REQUEST (&vif->tx, cons++, txp); }while (1 ); vif->tx.req_cons = cons;xen_netbk_check_rx_xenvif (vif);
@@ -959,8 +957,7 @@ static int netbk_count_requests(struct xenvif *vif,if (drop_err) txp = &dropped_tx; -memcpy (txp,RING_GET_REQUEST (&vif->tx, cons + slots), -sizeof (*txp)); +RING_COPY_REQUEST (&vif->tx, cons + slots, txp);/* If the guest submitted a frame >= 64 KiB then * first->size overflowed and following slots will
@@ -1248,8 +1245,7 @@ static int xen_netbk_get_extras(struct xenvif *vif,return -EBADR ; } -memcpy (&extra,RING_GET_REQUEST (&vif->tx, cons), -sizeof (extra)); +RING_COPY_REQUEST (&vif->tx, cons, &extra);if (unlikely (!extra.type || extra.type >=XEN_NETIF_EXTRA_TYPE_MAX )) { vif->tx.req_cons = ++cons;
@@ -1444,7 +1440,7 @@ static unsigned xen_netbk_tx_build_gops(struct xen_netbk *netbk) idx = vif->tx.req_cons;rmb ();/* Ensure that we see the request before we copy it. */ -memcpy (&txreq,RING_GET_REQUEST (&vif->tx, idx),sizeof (txreq)); +RING_COPY_REQUEST (&vif->tx, idx, &txreq);/* Credit-based scheduling. */ if (txreq.size > vif->remaining_credit &&
drivers/scsi/ses.c +28 -2
@@ -70,6 +70,7 @@ static int ses_probe(struct device *dev)static int ses_recv_diag (struct scsi_device *sdev,int page_code,void *buf,int bufflen) { +int ret;unsigned char cmd[] = {RECEIVE_DIAGNOSTIC ,1 ,/* Set PCV bit */
@@ -78,9 +79,26 @@ static int ses_recv_diag(struct scsi_device *sdev, int page_code, bufflen &0xff ,0 }; +unsigned char recv_page_code; -return scsi_execute_req (sdev, cmd,DMA_FROM_DEVICE , buf, bufflen, + ret =scsi_execute_req (sdev, cmd,DMA_FROM_DEVICE , buf, bufflen,NULL ,SES_TIMEOUT ,SES_RETRIES ,NULL ); +if (unlikely (!ret)) +return ret; + + recv_page_code = ((unsigned char *)buf)[0 ]; + +if (likely (recv_page_code == page_code)) +return ret; + +/* successful diagnostic but wrong page code. This happens to some +* USB devices, just print a message and pretend there was an error */ + +sdev_printk (KERN_ERR , sdev, +"Wrong diagnostic page; asked for %d got %u\n" , + page_code, recv_page_code); + +return -EINVAL ; } static int ses_send_diag(struct scsi_device *sdev, int page_code,
@@ -436,7 +454,15 @@ static void ses_enclosure_data_process(struct enclosure_device *edev,if (desc_ptr) desc_ptr += len; -if (addl_desc_ptr) +if (addl_desc_ptr && +/* only find additional descriptions for specific devices */ + (type_ptr[0 ] ==ENCLOSURE_COMPONENT_DEVICE || + type_ptr[0 ] ==ENCLOSURE_COMPONENT_ARRAY_DEVICE || + type_ptr[0 ] ==ENCLOSURE_COMPONENT_SAS_EXPANDER || +/* these elements are optional */ + type_ptr[0 ] ==ENCLOSURE_COMPONENT_SCSI_TARGET_PORT || + type_ptr[0 ] ==ENCLOSURE_COMPONENT_SCSI_INITIATOR_PORT || + type_ptr[0 ] ==ENCLOSURE_COMPONENT_CONTROLLER_ELECTRONICS )) addl_desc_ptr += addl_desc_ptr[1 ] +2 ; }
drivers/spi/spi.c +1 -1
@@ -554,7 +554,7 @@ struct spi_master *spi_alloc_master(struct device *dev, unsigned size)device_initialize (&master->dev); master->dev.class = &spi_master_class; - master->dev.parent =get_device (dev); + master->dev.parent = dev;spi_master_set_devdata (master, &master[1 ]);return master;
drivers/tty/tty_buffer.c +5 -3
@@ -442,10 +442,12 @@ static void flush_to_ldisc(struct work_struct *work) char_buf = head->char_buf_ptr + head->read; flag_buf = head->flag_buf_ptr + head->read; head->read += count; -spin_unlock_irqrestore (&tty->buf.lock, flags); - disc->ops->receive_buf (tty, char_buf, +if (disc->ops->receive_buf) { +spin_unlock_irqrestore (&tty->buf.lock, flags); + disc->ops->receive_buf (tty, char_buf, flag_buf, count); -spin_lock_irqsave (&tty->buf.lock, flags); +spin_lock_irqsave (&tty->buf.lock, flags); + } }clear_bit (TTY_FLUSHING , &tty->flags); }
drivers/usb/core/hub.c +20 -4
@@ -153,7 +153,7 @@ EXPORT_SYMBOL_GPL(ehci_cf_port_reset_rwsem);#define HUB_DEBOUNCE_STEP 25#define HUB_DEBOUNCE_STABLE 100 - +static void hub_release (struct kref *kref);static int usb_reset_and_verify_device (struct usb_device *udev);static inline char *portspeed (struct usb_hub *hub,int portstatus)
@@ -792,10 +792,20 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)unsigned delay;/* Continue a partial initialization */ -if (type ==HUB_INIT2 ) - goto init2; -if (type ==HUB_INIT3 ) +if (type ==HUB_INIT2 || type ==HUB_INIT3 ) { +device_lock (hub->intfdev); + +/* Was the hub disconnected while we were waiting? */ +if (hub->disconnected) { +device_unlock (hub->intfdev); +kref_put (&hub->kref, hub_release); +return ; + } +if (type ==HUB_INIT2 ) + goto init2; goto init3; + } +kref_get (&hub->kref);/* The superspeed hub except for root hub has to use Hub Depth * value as an offset into the route string to locate the bits
@@ -984,6 +994,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)PREPARE_DELAYED_WORK (&hub->init_work, hub_init_func3);schedule_delayed_work (&hub->init_work,msecs_to_jiffies (delay)); +device_unlock (hub->intfdev);return ;/* Continues at init3: below */ }else {msleep (delay);
@@ -1004,6 +1015,11 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)/* Allow autosuspend if it was suppressed */ if (type <=HUB_INIT3 )usb_autopm_put_interface_async (to_usb_interface (hub->intfdev)); + +if (type ==HUB_INIT2 || type ==HUB_INIT3 ) +device_unlock (hub->intfdev); + +kref_put (&hub->kref, hub_release); }/* Implement the continuations for the delays above */
drivers/usb/serial/ipaq.c +2 -1
@@ -582,7 +582,8 @@ static int ipaq_open(struct tty_struct *tty,* through. Since this has a reasonably high failure rate, we retry * several times. */ -while (retries--) { +while (retries) { + retries--; result =usb_control_msg (serial->dev,usb_sndctrlpipe (serial->dev,0 ),0x22 ,0x21 ,0x1 ,0 ,NULL ,0 ,100 );
drivers/video/fsl-diu-fb.c +12 -1
@@ -446,7 +446,10 @@ static enum fsl_diu_monitor_port fsl_diu_name_to_port(const char *s) port =FSL_DIU_PORT_DLVDS ; } -return diu_ops.valid_monitor_port (port); +if (diu_ops.valid_monitor_port) + port = diu_ops.valid_monitor_port (port); + +return port; }/**
@@ -1759,6 +1762,14 @@ static int __init fsl_diu_init(void)#else monitor_port =fsl_diu_name_to_port (monitor_string);#endif + +/* +* Must to verify set_pixel_clock. If not implement on platform, +* then that means that there is no platform support for the DIU. +*/ +if (!diu_ops.set_pixel_clock) +return -ENODEV ; +pr_info ("Freescale Display Interface Unit (DIU) framebuffer driver\n" );#ifdef CONFIG_NOT_COHERENT_CACHE
drivers/xen/xen-pciback/pciback.h +1 -0
@@ -37,6 +37,7 @@ struct xen_pcibk_device {struct xen_pci_sharedinfo *sh_info;unsigned long flags;struct work_struct op_work; +struct xen_pci_op op; };struct xen_pcibk_dev_data {
drivers/xen/xen-pciback/pciback_ops.c +60 -15
144 lines not on this page · raw message
fs/ocfs2/resize.c +12 -3
@@ -56,11 +56,12 @@ static u16 ocfs2_calc_new_backup_super(struct inode *inode,int new_clusters, u32 first_new_cluster, u16 cl_cpg, + u16 old_bg_clusters, int set) { int i;u16 backups =0 ; -u32 cluster; +u32 cluster, lgd_cluster;u64 blkno, gd_blkno, lgd_blkno =le64_to_cpu (gd->bg_blkno);for (i =0 ; i <OCFS2_MAX_BACKUP_SUPERBLOCKS ; i++) {
@@ -73,6 +74,12 @@ static u16 ocfs2_calc_new_backup_super(struct inode *inode,else if (gd_blkno > lgd_blkno)break ; +/* check if already done backup super */ + lgd_cluster =ocfs2_blocks_to_clusters (inode->i_sb, lgd_blkno); + lgd_cluster += old_bg_clusters; +if (lgd_cluster >= cluster) +continue ; +if (set)ocfs2_set_bit (cluster % cl_cpg, (unsigned long *)gd->bg_bitmap);
@@ -101,6 +108,7 @@ static int ocfs2_update_last_group_and_inode(handle_t *handle,u16 chain, num_bits, backups =0 ;u16 cl_bpc =le16_to_cpu (cl->cl_bpc);u16 cl_cpg =le16_to_cpu (cl->cl_cpg); +u16 old_bg_clusters;trace_ocfs2_update_last_group_and_inode (new_clusters, first_new_cluster);
@@ -114,6 +122,7 @@ static int ocfs2_update_last_group_and_inode(handle_t *handle, group = (struct ocfs2_group_desc *)group_bh->b_data; + old_bg_clusters =le16_to_cpu (group->bg_bits) / cl_bpc;/* update the group first. */ num_bits = new_clusters * cl_bpc;le16_add_cpu (&group->bg_bits, num_bits);
@@ -129,7 +138,7 @@ static int ocfs2_update_last_group_and_inode(handle_t *handle, group, new_clusters, first_new_cluster, - cl_cpg, 1); + cl_cpg, old_bg_clusters, 1);le16_add_cpu (&group->bg_free_bits_count,-1 * backups); }
@@ -169,7 +178,7 @@ out_rollback: group, new_clusters, first_new_cluster, - cl_cpg, 0); + cl_cpg, old_bg_clusters, 0);le16_add_cpu (&group->bg_free_bits_count, backups);le16_add_cpu (&group->bg_bits,-1 * num_bits);le16_add_cpu (&group->bg_free_bits_count,-1 * num_bits);
include/linux/enclosure.h +4 -0
@@ -29,7 +29,11 @@/* A few generic types ... taken from ses-2 */ enum enclosure_component_type {ENCLOSURE_COMPONENT_DEVICE =0x01 , +ENCLOSURE_COMPONENT_CONTROLLER_ELECTRONICS =0x07 , +ENCLOSURE_COMPONENT_SCSI_TARGET_PORT =0x14 , +ENCLOSURE_COMPONENT_SCSI_INITIATOR_PORT =0x15 ,ENCLOSURE_COMPONENT_ARRAY_DEVICE =0x17 , +ENCLOSURE_COMPONENT_SAS_EXPANDER =0x18 , };/* ses-2 common element status */
include/linux/skbuff.h +1 -2
@@ -2134,8 +2134,7 @@ extern int skb_copy_datagram_iovec(const struct sk_buff *from, int size);extern int skb_copy_and_csum_datagram_iovec (struct sk_buff *skb,int hlen, -struct iovec *iov, -int len); +struct iovec *iov); extern int skb_copy_datagram_from_iovec(struct sk_buff *skb, int offset, const struct iovec *from,
include/net/sctp/structs.h +2 -1
@@ -1586,7 +1586,8 @@ struct sctp_association {* : order. When DATA chunks are out of order, * : SACK's are not delayed (see Section 6). */ -__u8 sack_needed;/* Do we need to sack the peer? */ + __u8 sack_needed:1, /* Do we need to sack the peer? */ + zero_window_announced:1;__u32 sack_cnt;/* These are capabilities which our peer advertised. */
include/net/sock.h +1 -1
@@ -302,8 +302,8 @@ struct sock { sk_no_check : 2, sk_userlocks : 4, sk_protocol : 8, -#define SK_PROTOCOL_MAX ((u8)~0U) sk_type : 16; +#define SK_PROTOCOL_MAX ((u8)~0U)kmemcheck_bitfield_end (flags);int sk_wmem_queued;gfp_t sk_allocation;
include/sound/tlv.h +16 -8
@@ -38,21 +38,26 @@#define SNDRV_CTL_TLVT_DB_MINMAX 4/* dB scale with min/max */ #define SNDRV_CTL_TLVT_DB_MINMAX_MUTE 5/* dB scale with min/max with mute */ +#define TLV_ITEM (type, ...) \ + (type), TLV_LENGTH(__VA_ARGS__), __VA_ARGS__ +#define TLV_LENGTH (...) \ + ((unsigned int)sizeof((const unsigned int[]) { __VA_ARGS__ })) +#define TLV_DB_SCALE_MASK 0xffff#define TLV_DB_SCALE_MUTE 0x10000#define TLV_DB_SCALE_ITEM (min, step, mute) \ - SNDRV_CTL_TLVT_DB_SCALE, 2 * sizeof(unsigned int), \ - (min), ((step) & TLV_DB_SCALE_MASK) | ((mute) ? TLV_DB_SCALE_MUTE : 0) + TLV_ITEM(SNDRV_CTL_TLVT_DB_SCALE, \ + (min), \ + ((step) & TLV_DB_SCALE_MASK) | \ + ((mute) ? TLV_DB_SCALE_MUTE : 0))#define DECLARE_TLV_DB_SCALE (name, min, step, mute) \ unsigned int name[] = { TLV_DB_SCALE_ITEM(min, step, mute) }/* dB scale specified with min/max values instead of step */ #define TLV_DB_MINMAX_ITEM (min_dB, max_dB) \ - SNDRV_CTL_TLVT_DB_MINMAX, 2 * sizeof(unsigned int), \ - (min_dB), (max_dB) + TLV_ITEM(SNDRV_CTL_TLVT_DB_MINMAX, (min_dB), (max_dB))#define TLV_DB_MINMAX_MUTE_ITEM (min_dB, max_dB) \ - SNDRV_CTL_TLVT_DB_MINMAX_MUTE, 2 * sizeof(unsigned int), \ - (min_dB), (max_dB) + TLV_ITEM(SNDRV_CTL_TLVT_DB_MINMAX_MUTE, (min_dB), (max_dB))#define DECLARE_TLV_DB_MINMAX (name, min_dB, max_dB) \ unsigned int name[] = { TLV_DB_MINMAX_ITEM(min_dB, max_dB) }#define DECLARE_TLV_DB_MINMAX_MUTE (name, min_dB, max_dB) \
@@ -60,13 +65,16 @@/* linear volume between min_dB and max_dB (.01dB unit) */ #define TLV_DB_LINEAR_ITEM (min_dB, max_dB) \ - SNDRV_CTL_TLVT_DB_LINEAR, 2 * sizeof(unsigned int), \ - (min_dB), (max_dB) + TLV_ITEM(SNDRV_CTL_TLVT_DB_LINEAR, (min_dB), (max_dB))#define DECLARE_TLV_DB_LINEAR (name, min_dB, max_dB) \ unsigned int name[] = { TLV_DB_LINEAR_ITEM(min_dB, max_dB) }/* dB range container */ /* Each item is: <min> <max> <TLV> */ +#define TLV_DB_RANGE_ITEM (...) \ + TLV_ITEM(SNDRV_CTL_TLVT_DB_RANGE, __VA_ARGS__) +#define DECLARE_TLV_DB_RANGE (name, ...) \ + unsigned int name[] = { TLV_DB_RANGE_ITEM(__VA_ARGS__) }/* The below assumes that each item TLV is 4 words like DB_SCALE or LINEAR */ #define TLV_DB_RANGE_HEAD (num) \ SNDRV_CTL_TLVT_DB_RANGE, 6 * (num) * sizeof(unsigned int)
include/xen/interface/io/ring.h +14 -0
@@ -181,6 +181,20 @@ struct __name##_back_ring { \#define RING_GET_REQUEST (_r, _idx) \ (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].req)) +/* +* Get a local copy of a request. +* +* Use this in preference to RING_GET_REQUEST() so all processing is +* done on a local copy that cannot be modified by the other end. +* +* Note that https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 may cause this +* to be ineffective where _req is a struct which consists of only bitfields. +*/ +#define RING_COPY_REQUEST (_r, _idx, _req) do { \ +/* Use volatile to force the copy into _req. */ \ + *(_req) = *(volatile typeof (_req ))RING_GET_REQUEST (_r, _idx); \ +} while (0) +#define RING_GET_RESPONSE (_r, _idx) \ (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].rsp))
kernel/irq/manage.c +3 -3
@@ -1200,6 +1200,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)if (!desc)return NULL ; +chip_bus_lock (desc);raw_spin_lock_irqsave (&desc->lock, flags);/*
@@ -1213,7 +1214,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)if (!action) {WARN (1 ,"Trying to free already-free IRQ %d\n" , irq);raw_spin_unlock_irqrestore (&desc->lock, flags); - +chip_bus_sync_unlock (desc);return NULL ; }
@@ -1242,6 +1243,7 @@ static struct irqaction *__free_irq(unsigned int irq, void *dev_id)#endif raw_spin_unlock_irqrestore (&desc->lock, flags); +chip_bus_sync_unlock (desc);unregister_handler_proc (irq, action);
@@ -1316,9 +1318,7 @@ void free_irq(unsigned int irq, void *dev_id) desc->affinity_notify =NULL ;#endif -chip_bus_lock (desc);kfree (__free_irq (irq, dev_id)); -chip_bus_sync_unlock (desc); }EXPORT_SYMBOL (free_irq);
mm/memory_hotplug.c +19 -12
@@ -716,23 +716,30 @@ int is_mem_section_removable(unsigned long start_pfn, unsigned long nr_pages)*/ static int test_pages_in_a_zone (unsigned long start_pfn,unsigned long end_pfn) { -unsigned long pfn; +unsigned long pfn, sec_end_pfn;struct zone *zone =NULL ;struct page *page;int i; -for (pfn = start_pfn; +for (pfn = start_pfn, sec_end_pfn =SECTION_ALIGN_UP (start_pfn); pfn < end_pfn; - pfn +=MAX_ORDER_NR_PAGES ) { - i =0 ; -/* This is just a CONFIG_HOLES_IN_ZONE check.*/ -while ((i <MAX_ORDER_NR_PAGES ) && !pfn_valid_within (pfn + i)) - i++; -if (i ==MAX_ORDER_NR_PAGES ) + pfn = sec_end_pfn +1 , sec_end_pfn +=PAGES_PER_SECTION ) { +/* Make sure the memory section is present first */ +if (!present_section_nr (pfn_to_section_nr (pfn)))continue ; - page =pfn_to_page (pfn + i); -if (zone &&page_zone (page) != zone) -return 0 ; - zone =page_zone (page); +for (; pfn < sec_end_pfn && pfn < end_pfn; + pfn +=MAX_ORDER_NR_PAGES ) { + i =0 ; +/* This is just a CONFIG_HOLES_IN_ZONE check.*/ +while ((i <MAX_ORDER_NR_PAGES ) && + !pfn_valid_within (pfn + i)) + i++; +if (i ==MAX_ORDER_NR_PAGES ) +continue ; + page =pfn_to_page (pfn + i); +if (zone &&page_zone (page) != zone) +return 0 ; + zone =page_zone (page); + } }return 1 ; }
mm/vmstat.c +2 -1
@@ -1203,9 +1203,10 @@ static int __init setup_vmstat(void)#ifdef CONFIG_SMP int cpu; + vmstat_wq =alloc_workqueue ("vmstat" ,WQ_FREEZABLE |WQ_MEM_RECLAIM ,0 ); +register_cpu_notifier (&vmstat_notifier); - vmstat_wq =alloc_workqueue ("vmstat" ,WQ_FREEZABLE |WQ_MEM_RECLAIM ,0 );for_each_online_cpu (cpu)start_cpu_timer (cpu);#endif
net/core/datagram.c +1 -5
@@ -709,7 +709,6 @@ EXPORT_SYMBOL(__skb_checksum_complete);* @skb: skbuff * @hlen: hardware length * @iov: io vector -* @len: amount of data to copy from skb to iov * * Caller _must_ check that skb will fit to this iovec. *
@@ -719,14 +718,11 @@ EXPORT_SYMBOL(__skb_checksum_complete);* can be modified! */ int skb_copy_and_csum_datagram_iovec (struct sk_buff *skb, -int hlen,struct iovec *iov,int len) +int hlen,struct iovec *iov) {__wsum csum;int chunk = skb->len - hlen; -if (chunk > len) - chunk = len; -if (!chunk)return 0 ;
net/core/dev.c +4 -1
@@ -5446,7 +5446,10 @@ int __netdev_update_features(struct net_device *dev)netdev_err (dev,"set_features() failed (%d); wanted 0x%08x, left 0x%08x\n" , err, features, dev->features); -return 0 ; +/* return non-0 since some features might have changed and +* it's better to fire a spurious notification than miss it +*/ +return -1 ; }if (!err)
net/core/dst.c +2 -1
@@ -269,10 +269,11 @@ void dst_release(struct dst_entry *dst) {if (dst) {int newrefcnt; +unsigned short nocache = dst->flags &DST_NOCACHE ; newrefcnt =atomic_dec_return (&dst->__refcnt);WARN_ON (newrefcnt <0 ); -if (!newrefcnt &&unlikely (dst->flags &DST_NOCACHE )) { +if (!newrefcnt &&unlikely (nocache)) { dst =dst_destroy (dst);if (dst)__dst_free (dst);
net/ipv4/tcp_input.c +1 -1
@@ -5198,7 +5198,7 @@ static int tcp_copy_to_iovec(struct sock *sk, struct sk_buff *skb, int hlen) err =skb_copy_datagram_iovec (skb, hlen, tp->ucopy.iov, chunk); else err =skb_copy_and_csum_datagram_iovec (skb, hlen, - tp->ucopy.iov, chunk); + tp->ucopy.iov);if (!err) { tp->ucopy.len -= chunk;
net/ipv4/udp.c +5 -3
@@ -1172,6 +1172,7 @@ int udp_recvmsg(struct kiocb *iocb, struct sock *sk, struct msghdr *msg,int peeked;int err;int is_udplite =IS_UDPLITE (sk); +bool checksum_valid = false;bool slow;if (flags &MSG_ERRQUEUE )
@@ -1197,17 +1198,18 @@ try_again:*/ if (copied < ulen ||UDP_SKB_CB (skb)->partial_cov) { -if (udp_lib_checksum_complete (skb)) + checksum_valid = !udp_lib_checksum_complete (skb); +if (!checksum_valid) goto csum_copy_err; } -if (skb_csum_unnecessary (skb)) +if (checksum_valid ||skb_csum_unnecessary (skb)) err =skb_copy_datagram_iovec (skb,sizeof (struct udphdr ), msg->msg_iov, copied);else { err =skb_copy_and_csum_datagram_iovec (skb,sizeof (struct udphdr ), - msg->msg_iov, copied); + msg->msg_iov);if (err == -EINVAL ) goto csum_copy_err;
net/ipv6/addrlabel.c +1 -1
@@ -558,7 +558,7 @@ static int ip6addrlbl_get(struct sk_buff *in_skb, struct nlmsghdr* nlh,rcu_read_lock (); p =__ipv6_addr_label (net, addr,ipv6_addr_type (addr), ifal->ifal_index); -if (p &&ip6addrlbl_hold (p)) +if (p && !ip6addrlbl_hold (p)) p =NULL ; lseq = ip6addrlbl_table.seq;rcu_read_unlock ();
net/ipv6/raw.c +1 -1
@@ -479,7 +479,7 @@ static int rawv6_recvmsg(struct kiocb *iocb, struct sock *sk, goto csum_copy_err; err =skb_copy_datagram_iovec (skb,0 , msg->msg_iov, copied); }else { - err =skb_copy_and_csum_datagram_iovec (skb,0 , msg->msg_iov, copied); + err =skb_copy_and_csum_datagram_iovec (skb,0 , msg->msg_iov);if (err == -EINVAL ) goto csum_copy_err; }
net/ipv6/udp.c +5 -4
@@ -344,6 +344,7 @@ int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,int peeked;int err;int is_udplite =IS_UDPLITE (sk); +bool checksum_valid = false;int is_udp4;bool slow;
@@ -375,16 +376,16 @@ try_again:*/ if (copied < ulen ||UDP_SKB_CB (skb)->partial_cov) { -if (udp_lib_checksum_complete (skb)) + checksum_valid = !udp_lib_checksum_complete (skb); +if (!checksum_valid) goto csum_copy_err; } -if (skb_csum_unnecessary (skb)) +if (checksum_valid ||skb_csum_unnecessary (skb)) err =skb_copy_datagram_iovec (skb,sizeof (struct udphdr ), msg->msg_iov, copied );else { - err =skb_copy_and_csum_datagram_iovec (skb,sizeof (struct udphdr ), - msg->msg_iov, copied); + err =skb_copy_and_csum_datagram_iovec (skb,sizeof (struct udphdr ), msg->msg_iov);if (err == -EINVAL ) goto csum_copy_err; }
net/rfkill/core.c +3 -3
@@ -50,7 +50,6 @@struct rfkill {spinlock_t lock; -const char *name;enum rfkill_type type;unsigned long state;
@@ -74,6 +73,7 @@ struct rfkill {struct delayed_work poll_work;struct work_struct uevent_work;struct work_struct sync_work; +char name[]; };#define to_rfkill (d) container_of(d, struct rfkill, dev)
@@ -848,14 +848,14 @@ struct rfkill * __must_check rfkill_alloc(const char *name,if (WARN_ON (type ==RFKILL_TYPE_ALL || type >=NUM_RFKILL_TYPES ))return NULL ; - rfkill =kzalloc (sizeof (*rfkill),GFP_KERNEL ); + rfkill =kzalloc (sizeof (*rfkill) +strlen (name) +1 ,GFP_KERNEL );if (!rfkill)return NULL ;spin_lock_init (&rfkill->lock);INIT_LIST_HEAD (&rfkill->node); rfkill->type = type; - rfkill->name = name; +strcpy (rfkill->name, name); rfkill->ops = ops; rfkill->data = ops_data;
net/rxrpc/ar-recvmsg.c +1 -2
@@ -185,8 +185,7 @@ int rxrpc_recvmsg(struct kiocb *iocb, struct socket *sock, msg->msg_iov, copy); }else { ret =skb_copy_and_csum_datagram_iovec (skb, offset, - msg->msg_iov, - copy); + msg->msg_iov);if (ret == -EINVAL ) goto csum_copy_error; }
net/sctp/ipv6.c +1 -2
@@ -314,14 +314,13 @@ static void sctp_v6_get_dst(struct sctp_transport *t, union sctp_addr *saddr, } } } -rcu_read_unlock (); -if (baddr) {ipv6_addr_copy (&fl6->saddr, &baddr->v6.sin6_addr); fl6->fl6_sport = baddr->v6.sin6_port; final_p =fl6_update_dst (fl6, np->opt, &final); dst =ip6_dst_lookup_flow (sk, fl6, final_p, false); } +rcu_read_unlock (); out:if (!IS_ERR (dst)) {
net/sctp/outqueue.c +1 -0
@@ -1265,6 +1265,7 @@ int sctp_outq_sack(struct sctp_outq *q, struct sctp_sackhdr *sack)*/ sack_a_rwnd =ntohl (sack->a_rwnd); + asoc->peer.zero_window_announced = !sack_a_rwnd; outstanding = q->outstanding_bytes;if (outstanding < sack_a_rwnd)
net/sctp/sm_statefuns.c +2 -1
@@ -5302,7 +5302,8 @@ sctp_disposition_t sctp_sf_do_6_3_3_rtx(const struct sctp_endpoint *ep,SCTP_INC_STATS (SCTP_MIB_T3_RTX_EXPIREDS );if (asoc->overall_error_count >= asoc->max_retrans) { -if (asoc->state ==SCTP_STATE_SHUTDOWN_PENDING ) { +if (asoc->peer.zero_window_announced && + asoc->state ==SCTP_STATE_SHUTDOWN_PENDING ) {/* * We are here likely because the receiver had its rwnd * closed for a while and we have not been able to
scripts/recordmcount.c +113 -24
207 lines not on this page · raw message
security/keys/keyctl.c +9 -9
@@ -688,16 +688,16 @@ long keyctl_read_key(key_serial_t keyid, char __user *buffer, size_t buflen)/* the key is probably readable - now try to read it */ can_read_key: - ret =key_validate (key); -if (ret ==0 ) { - ret = -EOPNOTSUPP ; -if (key->type->read) { -/* read the data with the semaphore held (since we -* might sleep) */ -down_read (&key->sem); + ret = -EOPNOTSUPP ; +if (key->type->read) { +/* Read the data with the semaphore held (since we might sleep) +* to protect against the key being updated or revoked. +*/ +down_read (&key->sem); + ret =key_validate (key); +if (ret ==0 ) ret = key->type->read (key, buffer, buflen); -up_read (&key->sem); - } +up_read (&key->sem); } error2:
sound/usb/mixer.c +2 -0
@@ -1213,6 +1213,8 @@ static void build_feature_ctl(struct mixer_build *state, void *raw_desc,break ; } +snd_usb_mixer_fu_apply_quirk (state->mixer, cval, unitid, kctl); + range = (cval->max - cval->min) / cval->res;/* Are there devices with volume range more than 255? I use a bit more * to be sure. 384 is a resolution magic number found on Logitech
sound/usb/mixer_maps.c +0 -12
@@ -319,13 +319,6 @@ static struct usbmix_name_map bose_companion5_map[] = { { 0 } /* terminator */ }; -/* Dragonfly DAC 1.2, the dB conversion factor is 1 instead of 256 */ -static struct usbmix_dB_map dragonfly_1_2_dB = {0 ,5000 }; -static struct usbmix_name_map dragonfly_1_2_map[] = { - {7 ,NULL , .dB = &dragonfly_1_2_dB }, - {0 }/* terminator */ -}; -/* * Control map entries */
@@ -413,11 +406,6 @@ static struct usbmix_ctl_map usbmix_ctl_maps[] = { .id = USB_ID(0x05a7, 0x1020), .map = bose_companion5_map, }, - { -/* Dragonfly DAC 1.2 */ - .id = USB_ID(0x21b4, 0x0081), - .map = dragonfly_1_2_map, - }, { 0 } /* terminator */ };
sound/usb/mixer_quirks.c +37 -0
@@ -34,6 +34,7 @@#include <sound/control.h> #include <sound/hwdep.h> #include <sound/info.h> +#include <sound/tlv.h> #include "usbaudio.h" #include "mixer.h"
@@ -682,3 +683,39 @@ void snd_usb_mixer_rc_memory_change(struct usb_mixer_interface *mixer, } } +static void snd_dragonfly_quirk_db_scale (struct usb_mixer_interface *mixer, +struct snd_kcontrol *kctl) +{ +/* Approximation using 10 ranges based on output measurement on hw v1.2. +* This seems close to the cubic mapping e.g. alsamixer uses. */ + static const DECLARE_TLV_DB_RANGE(scale, +0 ,1 ,TLV_DB_MINMAX_ITEM (-5300 ,-4970 ), +2 ,5 ,TLV_DB_MINMAX_ITEM (-4710 ,-4160 ), +6 ,7 ,TLV_DB_MINMAX_ITEM (-3884 ,-3710 ), +8 ,14 ,TLV_DB_MINMAX_ITEM (-3443 ,-2560 ), +15 ,16 ,TLV_DB_MINMAX_ITEM (-2475 ,-2324 ), +17 ,19 ,TLV_DB_MINMAX_ITEM (-2228 ,-2031 ), +20 ,26 ,TLV_DB_MINMAX_ITEM (-1910 ,-1393 ), +27 ,31 ,TLV_DB_MINMAX_ITEM (-1322 ,-1032 ), +32 ,40 ,TLV_DB_MINMAX_ITEM (-968 ,-490 ), + 41, 50, TLV_DB_MINMAX_ITEM(-441, 0), + ); + +dev_info (&mixer->chip->dev->dev,"applying DragonFly dB scale quirk\n" ); + kctl->tlv.p = scale; + kctl->vd[0 ].access |=SNDRV_CTL_ELEM_ACCESS_TLV_READ ; + kctl->vd[0 ].access &= ~SNDRV_CTL_ELEM_ACCESS_TLV_CALLBACK ; +} + +void snd_usb_mixer_fu_apply_quirk (struct usb_mixer_interface *mixer, +struct usb_mixer_elem_info *cval,int unitid, +struct snd_kcontrol *kctl) +{ +switch (mixer->chip->usb_id) { +case USB_ID (0x21b4 ,0x0081 ):/* AudioQuest DragonFly */ +if (unitid ==7 && cval->min ==0 && cval->max ==50 ) +snd_dragonfly_quirk_db_scale (mixer, kctl); +break ; + } +} +
sound/usb/mixer_quirks.h +4 -0
@@ -9,5 +9,9 @@ void snd_emuusb_set_samplerate(struct snd_usb_audio *chip,void snd_usb_mixer_rc_memory_change (struct usb_mixer_interface *mixer,int unitid); +void snd_usb_mixer_fu_apply_quirk (struct usb_mixer_interface *mixer, +struct usb_mixer_elem_info *cval,int unitid, +struct snd_kcontrol *kctl); +#endif /* SND_USB_MIXER_QUIRKS_H */