Linux 3.4.72
Greg KH
maintainerI'm announcing the release of the 3.4.72 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/sysctl/kernel.txt | 25 ++++++--- Makefile | 2 arch/arm/mach-integrator/integrator_cp.c | 3 - arch/arm/mach-sa1100/assabet.c | 3 + arch/avr32/boot/u-boot/head.S | 35 +++++++++++-- arch/avr32/kernel/entry-avr32b.S | 3 - arch/avr32/kernel/head.S | 20 ------- arch/powerpc/kernel/signal_32.c | 16 ++---- arch/powerpc/kernel/signal_64.c | 6 ++ drivers/ata/ahci.c | 2 drivers/ata/libahci.c | 16 ++++++ drivers/ata/libata-core.c | 1 drivers/ata/libata-transport.c | 16 +++--- drivers/block/loop.c | 4 + drivers/block/xen-blkback/blkback.c | 3 - drivers/gpu/drm/i915/intel_display.c | 4 + drivers/gpu/drm/nouveau/nouveau_gem.c | 3 - drivers/gpu/drm/radeon/radeon_legacy_crtc.c | 28 ++++++++++ drivers/gpu/drm/radeon/sid.h | 2 drivers/gpu/drm/ttm/ttm_bo_util.c | 4 + drivers/hid/hid-apple.c | 22 ++++++++ drivers/hid/hid-roccat-kovaplus.c | 4 + drivers/infiniband/hw/ipath/ipath_user_sdma.c | 7 -- drivers/input/serio/i8042-x86ia64io.h | 2 drivers/md/dm-table.c | 18 ++++++ drivers/md/md.c | 1 drivers/mtd/nand/gpmi-nand/gpmi-nand.c | 4 - drivers/mtd/nand/nand_base.c | 15 ++++- drivers/net/can/flexcan.c | 12 ---- drivers/net/wireless/mwifiex/sdio.c | 3 + drivers/net/wireless/prism54/islpci_dev.c | 7 +- drivers/net/wireless/rt2x00/rt2400pci.c | 2 drivers/net/wireless/rtlwifi/rtl8192cu/mac.c | 6 +- drivers/net/wireless/rtlwifi/rtl8192cu/trx.c | 8 +-- drivers/net/wireless/rtlwifi/rtl8192de/trx.c | 2 drivers/net/wireless/rtlwifi/rtl8192se/rf.c | 2 drivers/net/wireless/rtlwifi/rtl8192se/trx.c | 2 drivers/pci/pcie/portdrv_pci.c | 1 drivers/s390/net/qeth_core_main.c | 6 +- drivers/staging/media/lirc/lirc_zilog.c | 12 ++++ drivers/staging/tidspbridge/Kconfig | 2 drivers/staging/vt6656/baseband.c | 11 ++++ drivers/staging/vt6656/rndis.h | 1 drivers/target/iscsi/iscsi_target_auth.c | 5 + drivers/target/iscsi/iscsi_target_nego.c | 2 drivers/video/backlight/atmel-pwm-bl.c | 4 - fs/devpts/inode.c | 1 fs/ext4/xattr.c | 1 include/linux/mtd/map.h | 4 - include/trace/ftrace.h | 5 + kernel/audit.c | 5 + kernel/cpuset.c | 8 ++- kernel/power/snapshot.c | 6 +- kernel/time/alarmtimer.c | 4 - kernel/trace/ftrace.c | 68 +++++++++++++------------- lib/vsprintf.c | 33 +++++++++++- security/selinux/netlabel.c | 6 -- sound/pci/hda/patch_realtek.c | 1 sound/soc/blackfin/bf5xx-i2s.c | 1 sound/soc/codecs/ak4642.c | 2 sound/soc/codecs/wm8962.c | 2 virt/kvm/kvm_main.c | 25 +++++---- 62 files changed, 362 insertions(+), 167 deletions(-)
Aaron Lu (1):
PM / hibernate: Avoid overflow in hibernate_preallocate_memory()
Alex Deucher (1):
drm/radeon/si: fix define for MC_SEQ_TRAIN_WAKEUP_CNTL
Alex Williamson (1):
KVM: Fix iommu map/unmap to handle memory slot moves
Andreas Bießmann (2):
avr32: setup crt for early panic()
avr32: fix out-of-range jump in large kernels
Avinash Patil (1):
mwifiex: correct packet length for packets from SDIO interface
Ben Skeggs (1):
drm/nouveau: when bailing out of a pushbuf ioctl, do not remove previous fence
Brian Norris (1):
mtd: nand: hack ONFI for non-power-of-2 dimensions
Dan Williams (1):
prism54: set netdev type to "wlan"
Daniel Vetter (1):
drm/i915: flush cursors harder
Eric Seppanen (2):
iscsi-target: fix extract_param to handle buffer length corner case
iscsi-target: chap auth shouldn't match username with trailing garbage
Felipe Pena (1):
rtlwifi: rtl8192se: Fix wrong assignment
Greg Kroah-Hartman (2):
Staging: tidspbridge: disable driver
Linux 3.4.72
Gwendal Grignou (1):
libata: Fix display of sata speed
Huang Shijie (1):
mtd: gpmi: fix kernel BUG due to racing DMA operations
Ilija Hadzic (1):
devpts: plug the memory leak in kill_sb
Jakob Bornecrantz (1):
drm/ttm: Handle in-memory region copies
Jan Kara (1):
IB/ipath: Convert ipath_user_sdma_pin_pages() to use get_user_pages_fast()
Jerome Glisse (1):
radeon: workaround pinning failure on low ram gpu
Johan Hovold (1):
backlight: atmel-pwm-bl: fix reported brightness
Jonathan Austin (1):
ARM: integrator_cp: Set LCD{0,1} enable lines when turning on CLCD
KOSAKI Motohiro (1):
alarmtimer: return EINVAL instead of ENOTSUPP if rtcdev doesn't exist
Kailang Yang (1):
ALSA: hda/realtek - Set pcbeep amp for ALC668
Larry Finger (4):
rtlwifi: rtl8192cu: Fix more pointer arithmetic errors
rtlwifi: rtl8192de: Fix incorrect signal strength for unassociated AP
rtlwifi: rtl8192se: Fix incorrect signal strength for unassociated AP
rtlwifi: rtl8192cu: Fix incorrect signal strength for unassociated AP
Malcolm Priestley (1):
staging: vt6656: [BUG] Fix for TX USB resets from vendors driver.
Marc Kleine-Budde (1):
can: flexcan: fix flexcan_chip_start() on imx6
Marcelo Tosatti (1):
KVM: perform an invalid memslot step for gpa base change
Mathias Krause (2):
audit: use nlmsg_len() to get message payload length
audit: fix info leak in AUDIT_GET requests
Mauro Carvalho Chehab (1):
media: lirc_zilog: Don't use dynamic static allocation
Michael Neuling (1):
powerpc/signals: Improved mark VSX not saved with small contexts fix
Mikulas Patocka (2):
loop: fix crash if blk_alloc_queue fails
dm: allocate buffer for messages with small number of arguments using GFP_NOIO
Nanno Langstraat (1):
HID: apple: option to swap the 'Option' ("Alt") and 'Command' ("Flag") keys.
NeilBrown (1):
md: fix calculation of stacking limits on level change.
Nicolin Chen (1):
ASoC: wm8962: Turn on regcache_cache_only before disabling regulator
Paul Moore (1):
selinux: correct locking in selinux_netlbl_socket_connect)
Peter Zijlstra (1):
cpuset: Fix memory allocator deadlock
Phil Edworthy (1):
ASoC: ak4642: prevent un-necessary changes to SG_SL1
Russell King (1):
ARM: sa11x0/assabet: ensure CS2 is configured appropriately
Ryan Mallon (1):
vsprintf: check real user/group id for %pK
Samir Benmendil (1):
ahci: add Marvell 9230 to the AHCI PCI device list
Shan Hai (1):
drivers/libata: Set max sector to 65535 for Slimtype DVD A DS8A9SH drive
Stanislaw Gruszka (1):
rt2400pci: fix RSSI read
Stefan Achatz (1):
HID: roccat: fix Coverity CID 141438
Steven Rostedt (Red Hat) (2):
tracing: Allow events to have NULL strings
ftrace: Fix function graph with loading of modules
Takashi Iwai (1):
ASoC: blackfin: Fix missing break
Theodore Ts'o (1):
ext4: avoid bh leak in retry path of ext4_expand_extra_isize_ea()
Tom Gundersen (1):
Input: i8042 - add PNP modaliases
Tyler Hicks (1):
audit: printk USER_AVC messages when audit isn't enabled
Ursula Braun (1):
qeth: avoid buffer overflow in snmp ioctl
Vegard Nossum (1):
xen/blkback: fix reference counting
Wang Haitao (1):
mtd: map: fixed bug in 64-bit systems
Yinghai Lu (1):
PCI: Remove duplicate pci_disable_device() from pcie_portdrv_remove()
xiangliang yu (1):
ahci: disabled FBS prior to issuing software reset
Greg KH
maintainerDocumentation/sysctl/kernel.txt +18 -7
@@ -284,13 +284,24 @@ Default value is "/sbin/hotplug". kptr_restrict: This toggle indicates whether restrictions are placed on -exposing kernel addresses via /proc and other interfaces. When -kptr_restrict is set to (0), there are no restrictions. When -kptr_restrict is set to (1), the default, kernel pointers -printed using the %pK format specifier will be replaced with 0's -unless the user has CAP_SYSLOG. When kptr_restrict is set to -(2), kernel pointers printed using %pK will be replaced with 0's -regardless of privileges. +exposing kernel addresses via /proc and other interfaces. + +When kptr_restrict is set to (0), the default, there are no restrictions. + +When kptr_restrict is set to (1), kernel pointers printed using the %pK +format specifier will be replaced with 0's unless the user has CAP_SYSLOG +and effective user and group ids are equal to the real ids. This is +because %pK checks are done at read() time rather than open() time, so +if permissions are elevated between the open() and the read() (e.g via +a setuid binary) then %pK will not leak kernel pointers to unprivileged +users. Note, this is a temporary solution only. The correct long-term +solution is to do the permission checks at open() time. Consider removing +world read permissions from files that use %pK, and using dmesg_restrict +to protect against uses of %pK in dmesg(8) if leaking kernel pointer +values to unprivileged users is a concern. + +When kptr_restrict is set to (2), kernel pointers printed using +%pK will be replaced with 0's regardless of privileges. ==============================================================
Makefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 4 -SUBLEVEL = 71 +SUBLEVEL = 72 EXTRAVERSION = NAME = Saber-toothed Squirrel
arch/arm/mach-integrator/integrator_cp.c +2 -1
@@ -366,7 +366,8 @@ static AMBA_APB_DEVICE(aaci, "mb:1d", 0, INTEGRATOR_CP_AACI_BASE,static void cp_clcd_enable (struct clcd_fb *fb) {struct fb_var_screeninfo *var = &fb->fb.var; -u32 val =CM_CTRL_STATIC1 |CM_CTRL_STATIC2 ; +u32 val =CM_CTRL_STATIC1 |CM_CTRL_STATIC2 + |CM_CTRL_LCDEN0 |CM_CTRL_LCDEN1 ;if (var->bits_per_pixel <=8 || (var->bits_per_pixel ==16 && var->green.length ==5 ))
arch/arm/mach-sa1100/assabet.c +3 -0
@@ -509,6 +509,9 @@ static void __init assabet_map_io(void)* Its called GPCLKR0 in my SA1110 manual. */ Ser1SDCR0 |=SDCR0_SUS ; +MSC1 = (MSC1 & ~0xffff ) | + MSC_NonBrst | MSC_32BitStMem | +MSC_RdAcc (2 ) |MSC_WrAcc (2 ) |MSC_Rec (0 );if (!machine_has_neponset ())sa1100_register_uart_fns (&assabet_port_fns);
arch/avr32/boot/u-boot/head.S +29 -6
@@ -8,6 +8,8 @@ * published by the Free Software Foundation. */ #include <asm/setup.h> +#include <asm/thread_info.h> +#include <asm/sysreg.h> /* * The kernel is loaded where we want it to be and all caches
@@ -20,11 +22,6 @@ .section .init.text,"ax" .global _start _start: - /* Check if the boot loader actually provided a tag table */ - lddpc r0, magic_number - cp.w r12, r0 - brne no_tag_table - /* Initialize .bss */ lddpc r2, bss_start_addr lddpc r3, end_addr
@@ -34,6 +31,25 @@ _start: cp r2, r3 brlo 1b + /* Initialize status register */ + lddpc r0, init_sr + mtsr SYSREG_SR, r0 + + /* Set initial stack pointer */ + lddpc sp, stack_addr + sub sp, -THREAD_SIZE + +#ifdef CONFIG_FRAME_POINTER + /* Mark last stack frame */ + mov lr, 0 + mov r7, 0 +#endif + + /* Check if the boot loader actually provided a tag table */ + lddpc r0, magic_number + cp.w r12, r0 + brne no_tag_table + /* * Save the tag table address for later use. This must be done * _after_ .bss has been initialized...
@@ -53,8 +69,15 @@ bss_start_addr: .long __bss_start end_addr: .long _end +init_sr: + .long 0x007f0000 /* Supervisor mode, everything masked */ +stack_addr: + .long init_thread_union +panic_addr: + .long panic no_tag_table: sub r12, pc, (. - 2f) - bral panic + /* branch to panic() which can be far away with that construct */ + lddpc pc, panic_addr 2: .asciz "Boot loader didn't provide correct magic number\n"
arch/avr32/kernel/entry-avr32b.S +2 -1
@@ -399,9 +399,10 @@ handle_critical: /* We should never get here... */ bad_return: sub r12, pc, (. - 1f) - bral panic + lddpc pc, 2f .align 2 1: .asciz "Return from critical exception!" +2: .long panic .align 1 do_bus_error_write:
arch/avr32/kernel/head.S +0 -20
@@ -10,33 +10,13 @@ #include <linux/linkage.h> #include <asm/page.h> -#include <asm/thread_info.h> -#include <asm/sysreg.h> .section .init.text,"ax" .global kernel_entry kernel_entry: - /* Initialize status register */ - lddpc r0, init_sr - mtsr SYSREG_SR, r0 - - /* Set initial stack pointer */ - lddpc sp, stack_addr - sub sp, -THREAD_SIZE - -#ifdef CONFIG_FRAME_POINTER - /* Mark last stack frame */ - mov lr, 0 - mov r7, 0 -#endif - /* Start the show */ lddpc pc, kernel_start_addr .align 2 -init_sr: - .long 0x007f0000 /* Supervisor mode, everything masked */ -stack_addr: - .long init_thread_union kernel_start_addr: .long start_kernel
arch/powerpc/kernel/signal_32.c +7 -9
@@ -447,6 +447,12 @@ static int save_user_regs(struct pt_regs *regs, struct mcontext __user *frame,#endif /* CONFIG_ALTIVEC */ if (copy_fpr_to_user (&frame->mc_fregs, current))return 1 ; + +/* +* Clear the MSR VSX bit to indicate there is no valid state attached +* to this context, except in the specific case below where we set it. +*/ + msr &= ~MSR_VSX ;#ifdef CONFIG_VSX /* * Copy VSR 0-31 upper half from thread_struct to local
@@ -459,15 +465,7 @@ static int save_user_regs(struct pt_regs *regs, struct mcontext __user *frame,if (copy_vsx_to_user (&frame->mc_vsregs, current))return 1 ; msr |= MSR_VSX; - }else if (!ctx_has_vsx_region) -/* -* With a small context structure we can't hold the VSX -* registers, hence clear the MSR value to indicate the state -* was not saved. -*/ - msr &= ~MSR_VSX ; - - + }#endif /* CONFIG_VSX */ #ifdef CONFIG_SPE /* save spe registers */
arch/powerpc/kernel/signal_64.c +6 -0
@@ -117,6 +117,12 @@ static long setup_sigcontext(struct sigcontext __user *sc, struct pt_regs *regs,flush_fp_to_thread (current);/* copy fpr regs and fpscr */ err |=copy_fpr_to_user (&sc->fp_regs, current); + +/* +* Clear the MSR VSX bit to indicate there is no valid state attached +* to this context, except in the specific case below where we set it. +*/ + msr &= ~MSR_VSX ;#ifdef CONFIG_VSX /* * Copy VSX low doubleword to local buffer for formatting,
drivers/ata/ahci.c +2 -0
@@ -402,6 +402,8 @@ static const struct pci_device_id ahci_pci_tbl[] = { .driver_data = board_ahci_yes_fbs }, /* 88se9172 on some Gigabyte */ { PCI_DEVICE(0x1b4b, 0x91a3), .driver_data = board_ahci_yes_fbs }, + { PCI_DEVICE(0x1b4b, 0x9230), + .driver_data = board_ahci_yes_fbs },/* Promise */ { PCI_VDEVICE(PROMISE, 0x3f20), board_ahci }, /* PDC42819 */
drivers/ata/libahci.c +16 -0
@@ -1249,9 +1249,11 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class, {struct ata_port *ap = link->ap;struct ahci_host_priv *hpriv = ap->host->private_data; +struct ahci_port_priv *pp = ap->private_data;const char *reason =NULL ;unsigned long now, msecs;struct ata_taskfile tf; +bool fbs_disabled = false;int rc;DPRINTK ("ENTER\n" );
@@ -1261,6 +1263,16 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class,if (rc && rc != -EOPNOTSUPP )ata_link_warn (link,"failed to reset engine (errno=%d)\n" , rc); +/* +* According to AHCI-1.2 9.3.9: if FBS is enable, software shall +* clear PxFBS.EN to '0' prior to issuing software reset to devices +* that is attached to port multiplier. +*/ +if (!ata_is_host_link (link) && pp->fbs_enabled) { +ahci_disable_fbs (ap); + fbs_disabled = true; + } +ata_tf_init (link->device, &tf);/* issue the first D2H Register FIS */
@@ -1301,6 +1313,10 @@ int ahci_do_softreset(struct ata_link *link, unsigned int *class, }else *class =ahci_dev_classify (ap); +/* re-enable FBS if disabled before */ +if (fbs_disabled) +ahci_enable_fbs (ap); +DPRINTK ("EXIT, class=%u\n" , *class);return 0 ;
drivers/ata/libata-core.c +1 -0
@@ -4074,6 +4074,7 @@ static const struct ata_blacklist_entry ata_device_blacklist [] = { { "TORiSAN DVD-ROM DRD-N216", NULL, ATA_HORKAGE_MAX_SEC_128 }, { "QUANTUM DAT DAT72-000", NULL, ATA_HORKAGE_ATAPI_MOD16_DMA }, { "Slimtype DVD A DS8A8SH", NULL, ATA_HORKAGE_MAX_SEC_LBA48 }, + { "Slimtype DVD A DS8A9SH", NULL, ATA_HORKAGE_MAX_SEC_LBA48 }, /* Devices we expect to fail diagnostics */
drivers/ata/libata-transport.c +8 -8
@@ -319,25 +319,25 @@ int ata_tport_add(struct device *parent,/* * ATA link attributes */ +static int noop (int x) {return x; } - -#define ata_link_show_linkspeed (field) \ +#define ata_link_show_linkspeed (field, format) \ static ssize_t \ show_ata_link_##field(struct device *dev, \ struct device_attribute *attr, char *buf) \ { \ struct ata_link *link = transport_class_to_link(dev); \ \ - return sprintf(buf,"%s\n", sata_spd_string(fls(link->field))); \ + return sprintf(buf, "%s\n", sata_spd_string(format(link->field))); \ } -#define ata_link_linkspeed_attr (field) \ - ata_link_show_linkspeed(field) \ +#define ata_link_linkspeed_attr (field, format) \ + ata_link_show_linkspeed(field, format) \ static DEVICE_ATTR(field, S_IRUGO, show_ata_link_##field, NULL) -ata_link_linkspeed_attr (hw_sata_spd_limit); -ata_link_linkspeed_attr (sata_spd_limit); -ata_link_linkspeed_attr (sata_spd); +ata_link_linkspeed_attr (hw_sata_spd_limit, fls); +ata_link_linkspeed_attr (sata_spd_limit, fls); +ata_link_linkspeed_attr (sata_spd, noop); static DECLARE_TRANSPORT_CLASS(ata_link_class,
drivers/block/loop.c +3 -1
@@ -1636,7 +1636,7 @@ static int loop_add(struct loop_device **l, int i) lo->lo_queue =blk_alloc_queue (GFP_KERNEL );if (!lo->lo_queue) - goto out_free_dev; + goto out_free_idr; disk = lo->lo_disk =alloc_disk (1 << part_shift);if (!disk)
@@ -1680,6 +1680,8 @@ static int loop_add(struct loop_device **l, int i) out_free_queue:blk_cleanup_queue (lo->lo_queue); +out_free_idr: +idr_remove (&loop_index_idr, i); out_free_dev:kfree (lo); out:
drivers/block/xen-blkback/blkback.c +2 -1
@@ -401,6 +401,8 @@ static int dispatch_discard_io(struct xen_blkif *blkif,unsigned long secure;struct phys_req preq; +xen_blkif_get (blkif); + preq.sector_number = req->u.discard.sector_number; preq.nr_sects = req->u.discard.nr_sectors;
@@ -413,7 +415,6 @@ static int dispatch_discard_io(struct xen_blkif *blkif, } blkif->st_ds_req++; -xen_blkif_get (blkif); secure = (blkif->vbd.discard_secure && (req->u.discard.flag &BLKIF_DISCARD_SECURE )) ?BLKDEV_DISCARD_SECURE :0 ;
drivers/gpu/drm/i915/intel_display.c +4 -0
@@ -6377,7 +6377,9 @@ static void i9xx_update_cursor(struct drm_crtc *crtc, u32 base) intel_crtc->cursor_visible = visible; }/* and commit changes on next vblank */ +POSTING_READ (CURCNTR (pipe));I915_WRITE (CURBASE (pipe), base); +POSTING_READ (CURBASE (pipe)); }static void ivb_update_cursor (struct drm_crtc *crtc,u32 base)
@@ -6402,7 +6404,9 @@ static void ivb_update_cursor(struct drm_crtc *crtc, u32 base) intel_crtc->cursor_visible = visible; }/* and commit changes on next vblank */ +POSTING_READ (CURCNTR_IVB (pipe));I915_WRITE (CURBASE_IVB (pipe), base); +POSTING_READ (CURBASE_IVB (pipe)); }/* If no-part of the cursor is visible on the framebuffer, then the GPU may hang... */
drivers/gpu/drm/nouveau/nouveau_gem.c +2 -1
@@ -281,7 +281,8 @@ validate_fini_list(struct list_head *list, struct nouveau_fence *fence)list_for_each_safe (entry, tmp, list) { nvbo = list_entry(entry, struct nouveau_bo, entry); -nouveau_bo_fence (nvbo, fence); +if (likely (fence)) +nouveau_bo_fence (nvbo, fence);if (unlikely (nvbo->validate_mapped)) {ttm_bo_kunmap (&nvbo->kmap);
drivers/gpu/drm/radeon/radeon_legacy_crtc.c +28 -0
@@ -416,6 +416,7 @@ int radeon_crtc_do_set_base(struct drm_crtc *crtc,/* Pin framebuffer & get tilling informations */ obj = radeon_fb->obj; rbo =gem_to_radeon_bo (obj); +retry: r =radeon_bo_reserve (rbo, false);if (unlikely (r !=0 ))return r;
@@ -424,6 +425,33 @@ int radeon_crtc_do_set_base(struct drm_crtc *crtc, &base);if (unlikely (r !=0 )) {radeon_bo_unreserve (rbo); + +/* On old GPU like RN50 with little vram pining can fails because +* current fb is taking all space needed. So instead of unpining +* the old buffer after pining the new one, first unpin old one +* and then retry pining new one. +* +* As only master can set mode only master can pin and it is +* unlikely the master client will race with itself especialy +* on those old gpu with single crtc. +* +* We don't shutdown the display controller because new buffer +* will end up in same spot. +*/ +if (!atomic && fb && fb != crtc->fb) { +struct radeon_bo *old_rbo; +unsigned long nsize, osize; + + old_rbo =gem_to_radeon_bo (to_radeon_framebuffer (fb)->obj); + osize =radeon_bo_size (old_rbo); + nsize =radeon_bo_size (rbo); +if (nsize <= osize && !radeon_bo_reserve (old_rbo, false)) { +radeon_bo_unpin (old_rbo); +radeon_bo_unreserve (old_rbo); + fb =NULL ; + goto retry; + } + }return -EINVAL ; }radeon_bo_get_tiling_flags (rbo, &tiling_flags,NULL );
drivers/gpu/drm/radeon/sid.h +1 -1
@@ -165,7 +165,7 @@#define NOOFGROUPS_SHIFT 12#define NOOFGROUPS_MASK 0x00001000 -#define MC_SEQ_TRAIN_WAKEUP_CNTL 0x2808 +#define MC_SEQ_TRAIN_WAKEUP_CNTL 0x28e8#define TRAIN_DONE_D0 (1 << 30)#define TRAIN_DONE_D1 (1 << 31)
drivers/gpu/drm/ttm/ttm_bo_util.c +3 -1
@@ -342,7 +342,9 @@ int ttm_bo_move_memcpy(struct ttm_buffer_object *bo,if (old_iomap ==NULL && ttm ==NULL ) goto out2; -if (ttm->state == tt_unpopulated) { +/* TTM might be null for moves within the same region. +*/ +if (ttm && ttm->state == tt_unpopulated) { ret = ttm->bdev->driver->ttm_tt_populate (ttm);if (ret) goto out1;
drivers/hid/hid-apple.c +22 -0
@@ -48,6 +48,12 @@ module_param(iso_layout, uint, 0644);MODULE_PARM_DESC (iso_layout,"Enable/Disable hardcoded ISO-layout of the keyboard. " "(0 = disabled, [1] = enabled)" ); +static unsigned int swap_opt_cmd =0 ; +module_param (swap_opt_cmd, uint,0644 ); +MODULE_PARM_DESC (swap_opt_cmd,"Swap the Option (\"Alt\") and Command (\"Flag\") keys. " +"(For people who want to keep Windows PC keyboard muscle memory. " +"[0] = as-is, Mac layout. 1 = swapped, Windows layout.)" ); +struct apple_sc {unsigned long quirks;unsigned int fn_on;
@@ -152,6 +158,14 @@ static const struct apple_key_translation apple_iso_keyboard[] = { { } }; +static const struct apple_key_translation swapped_option_cmd_keys[] = { + {KEY_LEFTALT ,KEY_LEFTMETA }, + {KEY_LEFTMETA ,KEY_LEFTALT }, + {KEY_RIGHTALT ,KEY_RIGHTMETA }, + {KEY_RIGHTMETA ,KEY_RIGHTALT }, + { } +}; +static const struct apple_key_translation *apple_find_translation (const struct apple_key_translation *table,u16 from) {
@@ -244,6 +258,14 @@ static int hidinput_apple_event(struct hid_device *hid, struct input_dev *input, } } +if (swap_opt_cmd) { + trans =apple_find_translation (swapped_option_cmd_keys, usage->code); +if (trans) { +input_event (input, usage->type, trans->to, value); +return 1 ; + } + } +return 0 ; }
drivers/hid/hid-roccat-kovaplus.c +4 -0
@@ -623,9 +623,13 @@ static void kovaplus_keep_values_up_to_date(struct kovaplus_device *kovaplus,break ;case KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_CPI : kovaplus->actual_cpi =kovaplus_convert_event_cpi (button_report->data1); +break ;case KOVAPLUS_MOUSE_REPORT_BUTTON_TYPE_SENSITIVITY : kovaplus->actual_x_sensitivity = button_report->data1; kovaplus->actual_y_sensitivity = button_report->data2; +break ; +default : +break ; } }
drivers/infiniband/hw/ipath/ipath_user_sdma.c +1 -6
@@ -280,9 +280,7 @@ static int ipath_user_sdma_pin_pages(const struct ipath_devdata *dd,int j;int ret; - ret =get_user_pages (current, current->mm, addr, - npages,0 ,1 , pages,NULL ); - + ret =get_user_pages_fast (addr, npages,0 , pages);if (ret != npages) {int i;
@@ -811,10 +809,7 @@ int ipath_user_sdma_writev(struct ipath_devdata *dd,while (dim) {const int mxp =8 ; -down_write (¤t->mm->mmap_sem); ret =ipath_user_sdma_queue_pkts (dd, pq, &list, iov, dim, mxp); -up_write (¤t->mm->mmap_sem); -if (ret <=0 ) goto done_unlock;else {
drivers/input/serio/i8042-x86ia64io.h +2 -0
@@ -765,6 +765,7 @@ static struct pnp_device_id pnp_kbd_devids[] = { { .id = "CPQA0D7", .driver_data = 0 }, { .id = "", }, }; +MODULE_DEVICE_TABLE (pnp, pnp_kbd_devids);static struct pnp_driver i8042_pnp_kbd_driver = { .name ="i8042 kbd" ,
@@ -786,6 +787,7 @@ static struct pnp_device_id pnp_aux_devids[] = { { .id = "SYN0801", .driver_data = 0 }, { .id = "", }, }; +MODULE_DEVICE_TABLE (pnp, pnp_aux_devids);static struct pnp_driver i8042_pnp_aux_driver = { .name ="i8042 aux" ,
drivers/md/dm-table.c +16 -2
@@ -581,14 +581,28 @@ static int adjoin(struct dm_table *table, struct dm_target *ti)/* * Used to dynamically allocate the arg array. +* +* We do first allocation with GFP_NOIO because dm-mpath and dm-thin must +* process messages even if some device is suspended. These messages have a +* small fixed number of arguments. +* +* On the other hand, dm-switch needs to process bulk data using messages and +* excessive use of GFP_NOIO could cause trouble. */ static char **realloc_argv (unsigned *array_size,char **old_argv) {char **argv;unsigned new_size; +gfp_t gfp; - new_size = *array_size ? *array_size *2 :64 ; - argv =kmalloc (new_size *sizeof (*argv),GFP_KERNEL ); +if (*array_size) { + new_size = *array_size *2 ; + gfp =GFP_KERNEL ; + }else { + new_size =8 ; + gfp =GFP_NOIO ; + } + argv =kmalloc (new_size *sizeof (*argv), gfp);if (argv) {memcpy (argv, old_argv, *array_size *sizeof (*argv)); *array_size = new_size;
drivers/md/md.c +1 -0
@@ -3507,6 +3507,7 @@ level_store(struct mddev *mddev, const char *buf, size_t len) mddev->in_sync =1 ;del_timer_sync (&mddev->safemode_timer); } +blk_set_stacking_limits (&mddev->queue->limits); pers->run (mddev);mddev_resume (mddev);set_bit (MD_CHANGE_DEVS , &mddev->flags);
drivers/mtd/nand/gpmi-nand/gpmi-nand.c +2 -2
@@ -227,8 +227,6 @@ static void dma_irq_callback(void *param)struct gpmi_nand_data *this = param;struct completion *dma_c = &this->dma_done; -complete (dma_c); -switch (this->dma_type) {case DMA_FOR_COMMAND :dma_unmap_sg (this->dev, &this->cmd_sgl,1 ,DMA_TO_DEVICE );
@@ -253,6 +251,8 @@ static void dma_irq_callback(void *param)default :pr_err ("in wrong DMA operation.\n" ); } + +complete (dma_c); } int start_dma_without_bch_irq(struct gpmi_nand_data *this,
drivers/mtd/nand/nand_base.c +13 -2
@@ -2888,10 +2888,21 @@ static int nand_flash_detect_onfi(struct mtd_info *mtd, struct nand_chip *chip,sanitize_string (p->model,sizeof (p->model));if (!mtd->name) mtd->name = p->model; + mtd->writesize =le32_to_cpu (p->byte_per_page); - mtd->erasesize =le32_to_cpu (p->pages_per_block) * mtd->writesize; + +/* +* pages_per_block and blocks_per_lun may not be a power-of-2 size +* (don't ask me who thought of this...). MTD assumes that these +* dimensions will be power-of-2, so just truncate the remaining area. +*/ + mtd->erasesize =1 << (fls (le32_to_cpu (p->pages_per_block)) -1 ); + mtd->erasesize *= mtd->writesize; + mtd->oobsize =le16_to_cpu (p->spare_bytes_per_page); - chip->chipsize =le32_to_cpu (p->blocks_per_lun); + +/* See erasesize comment */ + chip->chipsize =1 << (fls (le32_to_cpu (p->blocks_per_lun)) -1 ); chip->chipsize *= (uint64_t )mtd->erasesize * p->lun_count; *busw =0 ;if (le16_to_cpu (p->features) &1 )
drivers/net/can/flexcan.c +0 -12
@@ -667,7 +667,6 @@ static int flexcan_chip_start(struct net_device *dev) {struct flexcan_priv *priv =netdev_priv (dev);struct flexcan_regs __iomem *regs = priv->base; -unsigned int i;int err;u32 reg_mcr, reg_ctrl;
@@ -735,17 +734,6 @@ static int flexcan_chip_start(struct net_device *dev)netdev_dbg (dev,"%s: writing ctrl=0x%08x" , __func__, reg_ctrl);flexcan_write (reg_ctrl, ®s->ctrl); -for (i =0 ; i <ARRAY_SIZE (regs->cantxfg); i++) { -flexcan_write (0 , ®s->cantxfg[i].can_ctrl); -flexcan_write (0 , ®s->cantxfg[i].can_id); -flexcan_write (0 , ®s->cantxfg[i].data[0 ]); -flexcan_write (0 , ®s->cantxfg[i].data[1 ]); - -/* put MB into rx queue */ -flexcan_write (FLEXCAN_MB_CNT_CODE (0x4 ), - ®s->cantxfg[i].can_ctrl); - } -/* Abort any pending TX, mark Mailbox as INACTIVE */ flexcan_write (FLEXCAN_MB_CNT_CODE (0x4 ), ®s->cantxfg[FLEXCAN_TX_BUF_ID ].can_ctrl);
drivers/net/wireless/mwifiex/sdio.c +3 -0
@@ -938,7 +938,10 @@ static int mwifiex_decode_rx_packet(struct mwifiex_adapter *adapter, struct sk_buff *skb, u32 upld_typ) {u8 *cmd_buf; +__le16 *curr_ptr = (__le16 *)skb->data; +u16 pkt_len =le16_to_cpu (*curr_ptr); +skb_trim (skb, pkt_len);skb_pull (skb,INTF_HEADER_LEN );switch (upld_typ) {
drivers/net/wireless/prism54/islpci_dev.c +5 -2
@@ -811,6 +811,10 @@ static const struct net_device_ops islpci_netdev_ops = { .ndo_validate_addr = eth_validate_addr, }; +static struct device_type wlan_type = { + .name ="wlan" , +}; +struct net_device *islpci_setup (struct pci_dev *pdev) {
@@ -821,9 +825,8 @@ islpci_setup(struct pci_dev *pdev)return ndev;pci_set_drvdata (pdev, ndev); -#if defined(SET_NETDEV_DEV )SET_NETDEV_DEV (ndev, &pdev->dev); -#endif +SET_NETDEV_DEVTYPE (ndev, &wlan_type);/* setup the structure members */ ndev->base_addr =pci_resource_start (pdev,0 );
drivers/net/wireless/rt2x00/rt2400pci.c +1 -1
@@ -1253,7 +1253,7 @@ static void rt2400pci_fill_rxdone(struct queue_entry *entry,*/ rxdesc->timestamp = ((u64 )rx_high <<32 ) | rx_low; rxdesc->signal =rt2x00_get_field32 (word2,RXD_W2_SIGNAL ) & ~0x08 ; - rxdesc->rssi =rt2x00_get_field32 (word2,RXD_W3_RSSI ) - + rxdesc->rssi =rt2x00_get_field32 (word3,RXD_W3_RSSI ) - entry->queue->rt2x00dev->rssi_offset; rxdesc->size =rt2x00_get_field32 (word0,RXD_W0_DATABYTE_COUNT );
drivers/net/wireless/rtlwifi/rtl8192cu/mac.c +3 -3
@@ -762,7 +762,7 @@ static long _rtl92c_signal_scale_mapping(struct ieee80211_hw *hw, static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw, struct rtl_stats *pstats, - struct rx_desc_92c *pdesc, + struct rx_desc_92c *p_desc, struct rx_fwinfo_92c *p_drvinfo, bool packet_match_bssid, bool packet_toself,
@@ -777,11 +777,11 @@ static void _rtl92c_query_rxphystatus(struct ieee80211_hw *hw,u32 rssi, total_rssi =0 ;bool in_powersavemode = false;bool is_cck_rate; +u8 *pdesc = (u8 *)p_desc; - is_cck_rate =RX_HAL_IS_CCK_RATE (pdesc); + is_cck_rate =RX_HAL_IS_CCK_RATE (p_desc); pstats->packet_matchbssid = packet_match_bssid; pstats->packet_toself = packet_toself; - pstats->is_cck = is_cck_rate; pstats->packet_beacon = packet_beacon; pstats->is_cck = is_cck_rate; pstats->RX_SIGQ[0 ] =-1 ;
drivers/net/wireless/rtlwifi/rtl8192cu/trx.c +4 -4
@@ -303,10 +303,10 @@ out:bool rtl92cu_rx_query_desc (struct ieee80211_hw *hw,struct rtl_stats *stats,struct ieee80211_rx_status *rx_status, -u8 *p_desc,struct sk_buff *skb) +u8 *pdesc,struct sk_buff *skb) {struct rx_fwinfo_92c *p_drvinfo; -struct rx_desc_92c *pdesc = (struct rx_desc_92c *)p_desc; +struct rx_desc_92c *p_desc = (struct rx_desc_92c *)pdesc;u32 phystatus =GET_RX_DESC_PHY_STATUS (pdesc); stats->length = (u16 )GET_RX_DESC_PKT_LEN (pdesc);
@@ -345,11 +345,11 @@ bool rtl92cu_rx_query_desc(struct ieee80211_hw *hw,if (phystatus) { p_drvinfo = (struct rx_fwinfo_92c *)(skb->data + stats->rx_bufshift); -rtl92c_translate_rx_signal_stuff (hw, skb, stats, pdesc, +rtl92c_translate_rx_signal_stuff (hw, skb, stats, p_desc, p_drvinfo); }/*rx_status->qual = stats->signal; */ - rx_status->signal = stats->rssi +10 ; + rx_status->signal = stats->recvsignalpower +10 ;/*rx_status->noise = -stats->noise; */ return true; }
drivers/net/wireless/rtlwifi/rtl8192de/trx.c +1 -1
@@ -529,7 +529,7 @@ bool rtl92de_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, p_drvinfo); }/*rx_status->qual = stats->signal; */ - rx_status->signal = stats->rssi +10 ; + rx_status->signal = stats->recvsignalpower +10 ;/*rx_status->noise = -stats->noise; */ return true; }
drivers/net/wireless/rtlwifi/rtl8192se/rf.c +1 -1
@@ -268,7 +268,7 @@ static void _rtl92s_get_txpower_writeval_byregulatory(struct ieee80211_hw *hw, rtlefuse->pwrgroup_ht40 [RF90_PATH_A][chnl - 1]) { pwrdiff_limit[i] = - rtlefuse->pwrgroup_ht20 + rtlefuse->pwrgroup_ht40 [RF90_PATH_A ][chnl -1 ]; } }else {
drivers/net/wireless/rtlwifi/rtl8192se/trx.c +1 -1
@@ -582,7 +582,7 @@ bool rtl92se_rx_query_desc(struct ieee80211_hw *hw, struct rtl_stats *stats, }/*rx_status->qual = stats->signal; */ - rx_status->signal = stats->rssi +10 ; + rx_status->signal = stats->recvsignalpower +10 ;/*rx_status->noise = -stats->noise; */ return true;
drivers/pci/pcie/portdrv_pci.c +0 -1
@@ -151,7 +151,6 @@ static int __devinit pcie_portdrv_probe(struct pci_dev *dev,static void pcie_portdrv_remove (struct pci_dev *dev) {pcie_port_device_remove (dev); -pci_disable_device (dev); }static int error_detected_iter (struct device *device,void *data)
drivers/s390/net/qeth_core_main.c +5 -1
@@ -4357,7 +4357,7 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata)struct qeth_cmd_buffer *iob;struct qeth_ipa_cmd *cmd;struct qeth_snmp_ureq *ureq; -int req_len; +unsigned int req_len;struct qeth_arp_query_info qinfo = {0 , };int rc =0 ;
@@ -4373,6 +4373,10 @@ int qeth_snmp_command(struct qeth_card *card, char __user *udata)/* skip 4 bytes (data_len struct member) to get req_len */ if (copy_from_user (&req_len, udata +sizeof (int ),sizeof (int )))return -EFAULT ; +if (req_len > (QETH_BUFSIZE -IPA_PDU_HEADER_SIZE - +sizeof (struct qeth_ipacmd_hdr ) - +sizeof (struct qeth_ipacmd_setadpparms_hdr ))) +return -EINVAL ; ureq =memdup_user (udata, req_len +sizeof (struct qeth_snmp_ureq_hdr ));if (IS_ERR (ureq)) {QETH_CARD_TEXT (card,2 ,"snmpnome" );
drivers/staging/media/lirc/lirc_zilog.c +11 -1
@@ -61,6 +61,9 @@#include <media/lirc_dev.h> #include <media/lirc.h> +/* Max transfer size done by I2C transfer functions */ +#define MAX_XFER_SIZE 64 +struct IR ;struct IR_rx {
@@ -942,7 +945,14 @@ static ssize_t read(struct file *filep, char *outbuf, size_t n, loff_t *ppos)schedule ();set_current_state (TASK_INTERRUPTIBLE ); }else { -unsigned char buf[rbuf->chunk_size]; +unsigned char buf[MAX_XFER_SIZE ]; + +if (rbuf->chunk_size >sizeof (buf)) { +zilog_error ("chunk_size is too big (%d)!\n" , + rbuf->chunk_size); + ret = -EINVAL ; +break ; + } m =lirc_buffer_read (rbuf, buf);if (m == rbuf->chunk_size) { ret = copy_to_user((void *)outbuf+written, buf,
drivers/staging/tidspbridge/Kconfig +1 -1
@@ -4,7 +4,7 @@ menuconfig TIDSPBRIDGE tristate "DSP Bridge driver" - depends on ARCH_OMAP3 + depends on ARCH_OMAP3 && BROKEN select OMAP_MBOX_FWK help DSP/BIOS Bridge is designed for platforms that contain a GPP and
drivers/staging/vt6656/baseband.c +11 -0
@@ -976,6 +976,7 @@ BOOL BBbVT3184Init(PSDevice pDevice)PBYTE pbyAgc;WORD wLengthAgc;BYTE abyArray[256 ]; +u8 data; ntStatus = CONTROLnsRequestIn(pDevice, MESSAGE_TYPE_READ,
@@ -1144,6 +1145,16 @@ else {ControlvWriteByte (pDevice,MESSAGE_REQUEST_BBREG ,0x0D ,0x01 );RFbRFTableDownload (pDevice); + +/* Fix for TX USB resets from vendors driver */ +CONTROLnsRequestIn (pDevice,MESSAGE_TYPE_READ ,USB_REG4 , +MESSAGE_REQUEST_MEM ,sizeof (data), &data); + + data |=0x2 ; + +CONTROLnsRequestOut (pDevice,MESSAGE_TYPE_WRITE ,USB_REG4 , +MESSAGE_REQUEST_MEM ,sizeof (data), &data); +return TRUE;//ntStatus; }
drivers/staging/vt6656/rndis.h +1 -0
@@ -69,6 +69,7 @@#define VIAUSB20_PACKET_HEADER 0x04 +#define USB_REG4 0x604/*--------------------- Export Classes ----------------------------*/
drivers/target/iscsi/iscsi_target_auth.c +4 -1
@@ -174,6 +174,7 @@ static int chap_server_compute_md5(unsigned char client_digest[MD5_SIGNATURE_SIZE ];unsigned char server_digest[MD5_SIGNATURE_SIZE ];unsigned char chap_n[MAX_CHAP_N_SIZE ], chap_r[MAX_RESPONSE_LENGTH ]; +size_t compare_len;struct iscsi_chap *chap = conn->auth_protocol;struct crypto_hash *tfm;struct hash_desc desc;
@@ -212,7 +213,9 @@ static int chap_server_compute_md5( goto out; } -if (memcmp (chap_n, auth->userid,strlen (auth->userid)) !=0 ) { +/* Include the terminating NULL in the compare */ + compare_len =strlen (auth->userid) +1 ; +if (strncmp (chap_n, auth->userid, compare_len) !=0 ) {pr_err ("CHAP_N values do not match!\n" ); goto out; }
drivers/target/iscsi/iscsi_target_nego.c +1 -1
@@ -89,7 +89,7 @@ int extract_param(if (len <0 )return -1 ; -if (len > max_length) { +if (len >= max_length) {pr_err ("Length of input: %d exceeds max_length:" " %d\n" , len, max_length);return -1 ;
drivers/video/backlight/atmel-pwm-bl.c +2 -2
@@ -70,7 +70,7 @@ static int atmel_pwm_bl_set_intensity(struct backlight_device *bd)static int atmel_pwm_bl_get_intensity (struct backlight_device *bd) {struct atmel_pwm_bl *pwmbl =bl_get_data (bd); -u8 intensity; +u32 intensity;if (pwmbl->pdata->pwm_active_low) { intensity = pwm_channel_readl(&pwmbl->pwmc, PWM_CDTY) -
@@ -80,7 +80,7 @@ static int atmel_pwm_bl_get_intensity(struct backlight_device *bd)pwm_channel_readl (&pwmbl->pwmc,PWM_CDTY ); } -return intensity; +return intensity &0xffff ; }static int atmel_pwm_bl_init_pwm (struct atmel_pwm_bl *pwmbl)
fs/devpts/inode.c +1 -0
@@ -475,6 +475,7 @@ static void devpts_kill_sb(struct super_block *sb) {struct pts_fs_info *fsi =DEVPTS_SB (sb); +ida_destroy (&fsi->allocated_ptys);kfree (fsi);kill_litter_super (sb); }
fs/ext4/xattr.c +1 -0
@@ -1270,6 +1270,7 @@ retry: new_extra_isize = s_min_extra_isize;kfree (is); is =NULL ;kfree (bs); bs =NULL ; +brelse (bh); goto retry; } error =-1 ;
include/linux/mtd/map.h +2 -2
@@ -362,7 +362,7 @@ static inline map_word map_word_load_partial(struct map_info *map, map_word orig bitpos = (map_bankwidth (map)-1 -i)*8 ;#endif orig.x[0 ] &= ~(0xff << bitpos); - orig.x[0 ] |= buf[i-start] << bitpos; + orig.x[0 ] |= (unsigned long )buf[i-start] << bitpos; } }return orig;
@@ -381,7 +381,7 @@ static inline map_word map_word_ff(struct map_info *map)if (map_bankwidth (map) <MAP_FF_LIMIT ) {int bw =8 *map_bankwidth (map); - r.x[0 ] = (1 << bw) -1 ; + r.x[0 ] = (1UL << bw) -1 ; }else {for (i=0 ; i<map_words (map); i++) r.x[i] = ~0UL ;
include/trace/ftrace.h +3 -2
@@ -379,7 +379,8 @@ ftrace_define_fields_##call(struct ftrace_event_call *event_call) \ __data_size += (len) *sizeof (type);#undef __string -#define __string (item, src) __dynamic_array(char, item, strlen(src) + 1) +#define __string (item, src) __dynamic_array(char, item, \ + strlen((src) ? (const char *)(src) : "(null)") + 1)#undef DECLARE_EVENT_CLASS#define DECLARE_EVENT_CLASS (call, proto, args, tstruct, assign, print) \
@@ -504,7 +505,7 @@ static inline notrace int ftrace_get_offsets_##call( \#undef __assign_str#define __assign_str (dst, src) \ - strcpy(__get_str(dst), src); + strcpy(__get_str(dst), (src) ? (const char *)(src) : "(null)");#undef TP_fast_assign #define TP_fast_assign(args...) args
kernel/audit.c +3 -2
@@ -625,7 +625,7 @@ static int audit_log_common_recv_msg(struct audit_buffer **ab, u16 msg_type,char *ctx =NULL ;u32 len; -if (!audit_enabled) { +if (!audit_enabled && msg_type !=AUDIT_USER_AVC ) { *ab =NULL ;return rc; }
@@ -684,6 +684,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh)switch (msg_type) {case AUDIT_GET : + status_set.mask =0 ; status_set.enabled = audit_enabled; status_set.failure = audit_failure; status_set.pid = audit_pid;
@@ -695,7 +696,7 @@ static int audit_receive_msg(struct sk_buff *skb, struct nlmsghdr *nlh) &status_set, sizeof(status_set));break ;case AUDIT_SET : -if (nlh->nlmsg_len <sizeof (struct audit_status )) +if (nlmsg_len (nlh) <sizeof (struct audit_status ))return -EINVAL ; status_get = (struct audit_status *)data;if (status_get->mask &AUDIT_STATUS_ENABLED ) {
kernel/cpuset.c +6 -2
@@ -983,8 +983,10 @@ static void cpuset_change_task_nodemask(struct task_struct *tsk, need_loop =task_has_mempolicy (tsk) || !nodes_intersects (*newmems, tsk->mems_allowed); -if (need_loop) +if (need_loop) { +local_irq_disable ();write_seqcount_begin (&tsk->mems_allowed_seq); + }nodes_or (tsk->mems_allowed, tsk->mems_allowed, *newmems);mpol_rebind_task (tsk, newmems,MPOL_REBIND_STEP1 );
@@ -992,8 +994,10 @@ static void cpuset_change_task_nodemask(struct task_struct *tsk,mpol_rebind_task (tsk, newmems,MPOL_REBIND_STEP2 ); tsk->mems_allowed = *newmems; -if (need_loop) +if (need_loop) {write_seqcount_end (&tsk->mems_allowed_seq); +local_irq_enable (); + }task_unlock (tsk); }
kernel/power/snapshot.c +5 -1
@@ -1398,7 +1398,11 @@ int hibernate_preallocate_memory(void)* highmem and non-highmem zones separately. */ pages_highmem =preallocate_image_highmem (highmem /2 ); - alloc = (count - max_size) - pages_highmem; + alloc = count - max_size; +if (alloc > pages_highmem) + alloc -= pages_highmem; +else + alloc =0 ; pages =preallocate_image_memory (alloc, avail_normal);if (pages < alloc) {/* We have exhausted non-highmem pages, try highmem. */
kernel/time/alarmtimer.c +2 -2
@@ -474,7 +474,7 @@ static int alarm_clock_getres(const clockid_t which_clock, struct timespec *tp)clockid_t baseid = alarm_bases[clock2alarm (which_clock)].base_clockid;if (!alarmtimer_get_rtcdev ()) -return -ENOTSUPP ; +return -EINVAL ;return hrtimer_get_res (baseid, tp); }
@@ -491,7 +491,7 @@ static int alarm_clock_get(clockid_t which_clock, struct timespec *tp)struct alarm_base *base = &alarm_bases[clock2alarm (which_clock)];if (!alarmtimer_get_rtcdev ()) -return -ENOTSUPP ; +return -EINVAL ; *tp =ktime_to_timespec (base->gettime ());return 0 ;
kernel/trace/ftrace.c +34 -34
164 lines not on this page · raw message
lib/vsprintf.c +30 -3
@@ -25,6 +25,7 @@#include <linux/kallsyms.h> #include <linux/uaccess.h> #include <linux/ioport.h> +#include <linux/cred.h> #include <net/addrconf.h> #include <asm/page.h> /* for PAGE_SIZE */
@@ -930,11 +931,37 @@ char *pointer(const char *fmt, char *buf, char *end, void *ptr, spec.field_width =2 *sizeof (void *);return string (buf, end,"pK-error" , spec); } -if (!((kptr_restrict ==0 ) || - (kptr_restrict ==1 && -has_capability_noaudit (current,CAP_SYSLOG )))) + +switch (kptr_restrict) { +case 0 : +/* Always print %pK values */ +break ; +case 1 : { +/* +* Only print the real pointer value if the current +* process has CAP_SYSLOG and is running with the +* same credentials it started with. This is because +* access to files is checked at open() time, but %pK +* checks permission at read() time. We don't want to +* leak pointer values if a binary opens a file using +* %pK and then elevates privileges before reading it. +*/ +const struct cred *cred =current_cred (); + +if (!has_capability_noaudit (current,CAP_SYSLOG ) || + (cred->euid != cred->uid) || + (cred->egid != cred->gid)) + ptr =NULL ; +break ; + } +case 2 : +default : +/* Always print 0's for %pK */ ptr =NULL ; +break ; + }break ; +case 'N' :switch (fmt[1 ]) {case 'F' :
security/selinux/netlabel.c +2 -4
@@ -442,8 +442,7 @@ int selinux_netlbl_socket_connect(struct sock *sk, struct sockaddr *addr) sksec->nlbl_state != NLBL_CONNLABELED)return 0 ; -local_bh_disable (); -bh_lock_sock_nested (sk); +lock_sock (sk);/* connected sockets are allowed to disconnect when the address family * is set to AF_UNSPEC, if that is what is happening we want to reset
@@ -464,7 +463,6 @@ int selinux_netlbl_socket_connect(struct sock *sk, struct sockaddr *addr) sksec->nlbl_state =NLBL_CONNLABELED ; socket_connect_return: -bh_unlock_sock (sk); -local_bh_enable (); +release_sock (sk);return rc; }
sound/pci/hda/patch_realtek.c +1 -0
@@ -6969,6 +6969,7 @@ static int patch_alc662(struct hda_codec *codec)case 0x10ec0272 :case 0x10ec0663 :case 0x10ec0665 : +case 0x10ec0668 :set_beep_amp (spec,0x0b ,0x04 ,HDA_INPUT );break ;case 0x10ec0273 :
sound/soc/blackfin/bf5xx-i2s.c +1 -0
@@ -111,6 +111,7 @@ static int bf5xx_i2s_hw_params(struct snd_pcm_substream *substream, bf5xx_i2s->tcr2 |=7 ; bf5xx_i2s->rcr2 |=7 ; sport_handle->wdsize =1 ; +break ;case SNDRV_PCM_FORMAT_S16_LE : bf5xx_i2s->tcr2 |=15 ; bf5xx_i2s->rcr2 |=15 ;
sound/soc/codecs/ak4642.c +1 -1
@@ -262,7 +262,7 @@ static int ak4642_dai_startup(struct snd_pcm_substream *substream,* This operation came from example code of * "ASAHI KASEI AK4642" (japanese) manual p94. */ -snd_soc_write (codec,SG_SL1 ,PMMP |MGAIN0 ); +snd_soc_update_bits (codec,SG_SL1 ,PMMP |MGAIN0 ,PMMP |MGAIN0 );snd_soc_write (codec,TIMER ,ZTM (0x3 ) |WTM (0x3 ));snd_soc_write (codec,ALC_CTL1 ,ALC |LMTH0 );snd_soc_update_bits (codec,PW_MGMT1 ,PMADL ,PMADL );
sound/soc/codecs/wm8962.c +2 -0
@@ -3675,6 +3675,8 @@ static __devinit int wm8962_i2c_probe(struct i2c_client *i2c,if (ret <0 ) goto err_regmap; +regcache_cache_only (wm8962->regmap, true); +/* The drivers should power up as needed */ regulator_bulk_disable (ARRAY_SIZE (wm8962->supplies), wm8962->supplies);
virt/kvm/kvm_main.c +14 -11
@@ -774,7 +774,7 @@ int __kvm_set_memory_region(struct kvm *kvm,/* destroy any largepage mappings for dirty tracking */ } -if (!npages) { +if (!npages || base_gfn != old.base_gfn) {struct kvm_memory_slot *slot; r = -ENOMEM ;
@@ -790,8 +790,10 @@ int __kvm_set_memory_region(struct kvm *kvm, old_memslots = kvm->memslots;rcu_assign_pointer (kvm->memslots, slots);synchronize_srcu_expedited (&kvm->srcu); -/* From this point no new shadow pages pointing to a deleted -* memslot will be created. +/* slot was deleted or moved, clear iommu mapping */ +kvm_iommu_unmap_pages (kvm, &old); +/* From this point no new shadow pages pointing to a deleted, +* or moved, memslot will be created. * * validation of sp->gfn happens in: * - gfn_to_hva (kvm_read_guest, gfn_to_pfn)
@@ -805,20 +807,19 @@ int __kvm_set_memory_region(struct kvm *kvm,if (r) goto out_free; -/* map/unmap the pages in iommu page table */ -if (npages) { - r =kvm_iommu_map_pages (kvm, &new); -if (r) - goto out_free; - }else -kvm_iommu_unmap_pages (kvm, &old); - r = -ENOMEM ; slots =kmemdup (kvm->memslots,sizeof (struct kvm_memslots ),GFP_KERNEL );if (!slots) goto out_free; +/* map new memory slot into the iommu */ +if (npages) { + r =kvm_iommu_map_pages (kvm, &new); +if (r) + goto out_slots; + } +/* actual memory is freed via old in kvm_free_physmem_slot below */ if (!npages) { new.rmap =NULL ;
@@ -845,6 +846,8 @@ int __kvm_set_memory_region(struct kvm *kvm,return 0 ; +out_slots: +kfree (slots); out_free:kvm_free_physmem_slot (&new, &old); out: