Linux 3.9.3
Greg KH
maintainerI'm announcing the release of the 3.9.3 kernel.
All users of the 3.9 kernel series must upgrade.
The updated 3.9.y git tree can be found at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux-3.9.y
and can be browsed at the normal kernel.org git web browser:
http://git.kernel.org/?p=linux/kernel/git/stable/linux-stable.git;a=summary
thanks,
greg k-h
------------
Makefile | 2 arch/arm/include/asm/cmpxchg.h | 8 - arch/arm/mach-exynos/include/mach/regs-pmu.h | 1 arch/arm/mach-exynos/pmu.c | 5 arch/arm/mach-omap2/board-rx51-peripherals.c | 4 arch/parisc/Makefile | 23 +-- arch/parisc/kernel/entry.S | 172 ++++++++++++++------------- arch/powerpc/include/asm/rtas.h | 2 arch/powerpc/kernel/machine_kexec_64.c | 4 arch/powerpc/kernel/rtas.c | 113 +++++++++++++++++ arch/powerpc/platforms/pseries/suspend.c | 22 +++ arch/tile/Kconfig | 14 +- arch/tile/include/hv/hypervisor.h | 27 +++- arch/tile/kernel/head_32.S | 2 arch/tile/kernel/head_64.S | 12 + arch/x86/Kconfig | 1 arch/x86/kernel/microcode_intel_early.c | 5 arch/x86/kvm/emulate.c | 42 ++++++ arch/x86/kvm/vmx.c | 6 arch/x86/xen/enlighten.c | 15 ++ drivers/acpi/acpica/exfldio.c | 14 ++ drivers/acpi/ec.c | 4 drivers/block/drbd/drbd_main.c | 1 drivers/block/drbd/drbd_receiver.c | 5 drivers/char/ipmi/ipmi_bt_sm.c | 4 drivers/char/ipmi/ipmi_devintf.c | 14 ++ drivers/cpufreq/intel_pstate.c | 67 ++-------- drivers/dma/of-dma.c | 8 - drivers/dma/pch_dma.c | 2 drivers/gpu/drm/drm_crtc.c | 4 drivers/gpu/drm/drm_mm.c | 34 ++--- drivers/gpu/drm/i915/intel_fb.c | 16 ++ drivers/gpu/drm/mgag200/mgag200_mode.c | 69 +++++++--- drivers/gpu/drm/radeon/r300_cmdbuf.c | 2 drivers/gpu/drm/radeon/radeon_drv.c | 12 + drivers/hid/hid-core.c | 1 drivers/md/dm-bufio.c | 24 +++ drivers/md/dm-cache-target.c | 1 drivers/md/dm-snap.c | 1 drivers/md/dm-stripe.c | 11 - drivers/md/dm-table.c | 2 drivers/net/ethernet/3com/3c509.c | 2 drivers/net/ethernet/3com/3c59x.c | 27 ++-- drivers/net/ethernet/sfc/mcdi.c | 2 drivers/net/ethernet/tile/tilegx.c | 2 drivers/net/macvlan.c | 7 - drivers/net/tun.c | 7 - drivers/net/usb/asix_common.c | 3 drivers/net/wireless/ath/ath9k/main.c | 6 drivers/net/wireless/b43/dma.c | 19 ++ drivers/net/wireless/b43/dma.h | 4 drivers/net/wireless/b43/main.c | 43 ++---- drivers/net/wireless/iwlegacy/4965-mac.c | 3 drivers/net/wireless/mwifiex/cfg80211.c | 3 drivers/net/wireless/mwifiex/cmdevt.c | 1 drivers/net/wireless/mwifiex/main.c | 1 drivers/net/wireless/mwifiex/sta_ioctl.c | 21 --- drivers/platform/x86/hp_accel.c | 3 drivers/rtc/Kconfig | 2 drivers/rtc/rtc-pcf2123.c | 1 drivers/scsi/sd.c | 20 +++ drivers/scsi/sd.h | 1 drivers/target/iscsi/iscsi_target_erl1.c | 7 - drivers/target/target_core_file.c | 10 - drivers/target/target_core_iblock.c | 2 drivers/target/target_core_transport.c | 11 - drivers/watchdog/watchdog_dev.c | 3 fs/ext4/mballoc.c | 6 fs/namei.c | 2 fs/nfsd/nfs4proc.c | 15 ++ fs/nfsd/nfs4recover.c | 12 - include/linux/audit.h | 7 - include/linux/kref.h | 33 +++++ include/linux/time.h | 4 include/net/inet_frag.h | 5 include/net/sock.h | 12 + include/net/tcp.h | 1 include/uapi/linux/audit.h | 1 include/uapi/linux/if_cablemodem.h | 12 - include/uapi/linux/virtio_net.h | 2 ipc/shm.c | 8 + kernel/auditfilter.c | 31 ++++ kernel/auditsc.c | 5 kernel/kmod.c | 5 kernel/sched/cputime.c | 70 ++++++++-- kernel/time/Kconfig | 5 kernel/time/tick-sched.c | 2 kernel/timer.c | 2 kernel/trace/trace_events_filter.c | 4 mm/mmap.c | 8 - net/8021q/vlan_dev.c | 2 net/bridge/br_stp_timer.c | 2 net/core/dev.c | 2 net/core/ethtool.c | 2 net/core/sock.c | 12 - net/ipv4/inet_fragment.c | 1 net/ipv4/tcp_minisocks.c | 7 - net/ipv6/ip6_gre.c | 2 net/ipv6/tcp_ipv6.c | 12 + net/ipv6/udp.c | 13 +- net/ipv6/udp_impl.h | 2 net/ipv6/udplite.c | 2 net/ipv6/xfrm6_policy.c | 4 net/mac802154/mac802154.h | 2 net/packet/af_packet.c | 53 +++----- net/sched/act_ipt.c | 33 ++++- net/vmw_vsock/af_vsock.c | 2 sound/pci/hda/hda_codec.c | 7 - sound/pci/hda/patch_conexant.c | 17 ++ sound/soc/codecs/da7213.c | 8 - sound/soc/codecs/wm8994.c | 1 111 files changed, 994 insertions(+), 431 deletions(-)
Aaro Koskinen (1):
ARM: OMAP: RX-51: change probe order of touchscreen and panel SPI devices
Amerigo Wang (1):
ipv6,gre: do not leak info to user-space
Amitkumar Karwar (1):
mwifiex: fix memory leak issue when driver unload
Andy Grover (1):
target: Use FD_MAX_SECTORS/FD_BLOCKSIZE for blockdevs using fileio
Anton Blanchard (2):
audit: Syscall rules are not applied to existing processes on non-x86 powerpc/kexec: Fix kexec when using VMX optimised memcpy
Axel Lin (1):
ASoC: da7213: Fix setting dmic_samplephase and dmic_clk_rate
Ben Hutchings (1):
sfc: Fix naming of MTD partitions for FPGA bitfiles
Benjamin LaHaise (1):
ipmi: ipmi_devintf: compat_ioctl method fails to take ipmi_mutex
Bing Zhao (1):
mwifiex: clear is_suspended flag when interrupt is received early
Bjørn Mork (1):
net: vlan,ethtool: netdev_features_t is more than 32 bit
Bob Moore (1):
ACPICA: Fix possible buffer overflow during a field unit read operation
Chen Gang (2):
net: mac802154: comparision issue of type cast, finding by EXTRA_CFLAGS=-W drivers/char/ipmi: memcpy, need additional 2 bytes to avoid memory overflow
Chris Metcalf (1):
tile: support new Tilera hypervisor
Christopher Harvey (2):
drm/mgag200: Fix writes into MGA1064_PIX_CLK_CTL register drm/mgag200: Fix framebuffer base address programming
Cong Wang (1):
xfrm6: release dev before returning error
Dan Carpenter (1):
ASoC: wm8994: missing break in wm8994_aif3_hw_params()
Daniel Borkmann (1):
packet: tpacket_v3: do not trigger bug() on wrong header status
Daniel Drake (1):
mwifiex: fix setting of multicast filter
Daniel Vetter (2):
drm/mm: fix dump table BUG
drm: don't check modeset locks in panic handler
Dave Airlie (1):
drm/radeon: restore nomodeset operation (v2)
Dirk Brandewie (3):
cpufreq / intel_pstate: remove idle time and duration from sample and calculations cpufreq / intel_pstate: use lowest requested max performance
cpufreq / intel_pstate: fix ffmpeg regression
Eric Dumazet (2):
tcp: force a dst refcount when prequeue packet
ipv6: do not clear pinet6 field
Eric W. Biederman (1):
audit: Make testing for a valid loginuid explicit.
Felix Fietkau (1):
ath9k: fix key allocation error handling for powersave keys
Fernando Luis Vazquez Cao (1):
HID: reintroduce fix-up for certain Sony RF receivers
Frederic Weisbecker (2):
math64: New div64_u64_rem helper
sched: Lower chances of cputime scaling overflow
Gao feng (1):
net: tun: release the reference of tun device in tun_recvmsg
Geert Uytterhoeven (1):
VSOCK: Drop bogus __init annotation from vsock_init_tables()
Gleb Natapov (1):
KVM: VMX: fix halt emulation while emulating invalid guest sate
Greg Kroah-Hartman (1):
Linux 3.9.3
Guenter Roeck (1):
watchdog: Fix race condition in registration code
Helge Deller (1):
parisc: make default cross compiler search more robust (v3)
Inderpal Singh (1):
ARM: EXYNOS5: Fix kernel dump in AFTR idle mode
J. Bruce Fields (1):
nfsd4: don't allow owner override on 4.1 CLAIM_FH opens
Jaccon Bastiaansen (1):
ARM: 7720/1: ARM v6/v7 cmpxchg64 shouldn't clear upper 32 bits of the old/new value
Jamal Hadi Salim (1):
net_sched: act_ipt forward compat with xtables
James Bottomley (1):
SCSI: sd: fix array cache flushing bug causing performance problems
Jani Nikula (1):
drm/i915: clear the stolen fb before resuming
Jeff Layton (2):
nfsd: fix oops when legacy_recdir_name_error is passed a -ENOENT error
audit: vfs: fix audit_inode call in O_CREAT case of do_last
Jiri Pirko (1):
macvlan: fix passthru mode race between dev removal and rx path
Joern Engel (1):
target: close target_put_sess_cmd() vs. core_tmr_abort_task() race
John David Anglin (3):
parisc: only re-enable interrupts if we need to schedule or deliver signals when returning to userspace
parisc: fix SMP races when updating PTE and TLB entries in entry.S
parisc: use long branch in fork_like macro
John Stultz (1):
time: Revert ALWAYS_USE_PERSISTENT_CLOCK compile time optimizaitons
Josh Boyer (1):
if_cablemodem.h: Add parenthesis around ioctl macros
Kees Cook (1):
drm/radeon: check incoming cliprects pointer
Konrad Rzeszutek Wilk (2):
xen/vcpu/pvhvm: Fix vcpu hotplugging hanging. x86/microcode: Add local mutex to fix physical CPU hot-add deadlock
Konstantin Khlebnikov (1):
net: frag, fix race conditions in LRU list maintenance
Lachlan McIlroy (1):
ext4: limit group search loop for non-extent files
Lan Tianyu (1):
ACPI / EC: Restart transaction even when the IBF flag set
Lars Ellenberg (1):
drbd: fix memory leak
Li Zefan (1):
shm: fix null pointer deref when userspace specifies invalid hugepage size
Matthew Whitehead (1):
3c509.c: call SET_NETDEV_DEV for all device types (ISA/ISAPnP/EISA)
Mike Frysinger (1):
parisc: fix NATIVE set up in build
Mike Snitzer (2):
dm table: fix write same support
dm stripe: fix regression in stripe_width calculation
Mikulas Patocka (1):
dm bufio: avoid a possible __vmalloc deadlock
Nicholas Bellinger (1):
target/iblock: Fix WCE=1 + DPOFUA=1 backend WRITE regression
Oleg Nesterov (1):
usermodehelper: check subprocess_info->path != NULL
Paolo Bonzini (3):
KVM: emulator: emulate AAM
KVM: emulator: emulate XLAT
KVM: emulator: emulate SALC
Patrick McHardy (1):
net: use netdev_features_t in skb_needs_linearize()
Philipp Reisner (2):
drbd: Fix build error when CONFIG_CRYPTO_HMAC is not set
drbd: fix for deadlock when using automatic split-brain-recovery
Robert Jennings (1):
powerpc: Bring all threads online prior to migration/hibernation
Sergei Shtylyov (2):
3c59x: fix freeing nonexistent resource on driver unload 3c59x: fix PCI resource management
Shlomo Pongratz (1):
iscsi-target: Fix processing of OOO commands
Shuah Khan (1):
hp_accel: Ignore the error from lis3lv02d_poweron() at resume
Stanislaw Gruszka (5):
sched: Avoid cputime scaling overflow
sched: Do not account bogus utime
Revert "math64: New div64_u64_rem helper"
sched: Avoid prev->stime underflow
iwl4965: workaround connection regression on passive channel
Steven Rostedt (Red Hat) (1):
tracing: Fix leaks of filter preds
Takashi Iwai (2):
Revert "ALSA: hda - Don't set up active streams twice"
ALSA: hda - Fix 3.9 regression of EAPD init on Conexant codecs
Thomas Gleixner (1):
tick: Cleanup NOHZ per cpu data on cpu down
Thommy Jakobsson (1):
B43: Handle DMA RX descriptor underrun
Tirupathi Reddy (1):
timer: Don't reinitialize the cpu base lock during CPU_UP_PREPARE
Tomoya MORINAGA (1):
pch_dma: Use GFP_ATOMIC because called from interrupt context
Viresh Kumar (1):
DMA: OF: Check properties value before running be32_to_cpup() on it
Wang YanQing (1):
ALSA: HDA: Fix Oops caused by dereference NULL pointer
Wei Yongjun (3):
dm snapshot: fix error return code in snapshot_ctr
dm cache: fix error return code in cache_create drivers/rtc/rtc-pcf2123.c: fix error return code in pcf2123_probe()
Yuchung Cheng (1):
tcp: reset timer after any SYNACK retransmit
[email protected] (1):
asix: fix BUG in receive path when lowering MTU
stephen hemminger (2):
bridge: fix race with topology change timer
virtio: don't expose u16 in userspace api
Greg KH
maintainerMakefile +1 -1
@@ -1,6 +1,6 @@ VERSION = 3 PATCHLEVEL = 9 -SUBLEVEL = 2 +SUBLEVEL = 3 EXTRAVERSION = NAME = Unicycling Gorilla
arch/arm/include/asm/cmpxchg.h +4 -4
@@ -233,15 +233,15 @@ static inline unsigned long __cmpxchg_local(volatile void *ptr, ((__typeof__ (*(ptr )))atomic64_cmpxchg (container_of ((ptr), \ atomic64_t, \ counter), \ - (unsigned long )(o), \ - (unsigned long)(n))) + (unsigned long long )(o), \ + (unsigned long long)(n)))#define cmpxchg64_local (ptr, o, n) \ ((__typeof__(*(ptr)))local64_cmpxchg(container_of((ptr), \ local64_t, \ a), \ - (unsigned long)(o), \ - (unsigned long)(n))) + (unsigned long long)(o), \ + (unsigned long long)(n)))#endif /* __LINUX_ARM_ARCH__ >= 6 */
arch/arm/mach-exynos/include/mach/regs-pmu.h +1 -0
@@ -344,6 +344,7 @@#define EXYNOS5_FSYS_ARM_OPTION S5P_PMUREG(0x2208)#define EXYNOS5_ISP_ARM_OPTION S5P_PMUREG(0x2288)#define EXYNOS5_ARM_COMMON_OPTION S5P_PMUREG(0x2408) +#define EXYNOS5_ARM_L2_OPTION S5P_PMUREG(0x2608)#define EXYNOS5_TOP_PWR_OPTION S5P_PMUREG(0x2C48)#define EXYNOS5_TOP_PWR_SYSMEM_OPTION S5P_PMUREG(0x2CC8)#define EXYNOS5_JPEG_MEM_OPTION S5P_PMUREG(0x2F48)
arch/arm/mach-exynos/pmu.c +2 -3
@@ -228,6 +228,7 @@ static struct exynos_pmu_conf exynos5250_pmu_config[] = { { EXYNOS5_DIS_IRQ_ISP_ARM_CENTRAL_SYS_PWR_REG, { 0x0, 0x0, 0x0} }, { EXYNOS5_ARM_COMMON_SYS_PWR_REG, { 0x0, 0x0, 0x2} }, { EXYNOS5_ARM_L2_SYS_PWR_REG, { 0x3, 0x3, 0x3} }, + { EXYNOS5_ARM_L2_OPTION, { 0x10, 0x10, 0x0 } }, { EXYNOS5_CMU_ACLKSTOP_SYS_PWR_REG, { 0x1, 0x0, 0x1} }, { EXYNOS5_CMU_SCLKSTOP_SYS_PWR_REG, { 0x1, 0x0, 0x1} }, { EXYNOS5_CMU_RESET_SYS_PWR_REG, { 0x1, 0x1, 0x0} },
@@ -353,11 +354,9 @@ static void exynos5_init_pmu(void)/* * SKIP_DEACTIVATE_ACEACP_IN_PWDN_BITFIELD Enable -* MANUAL_L2RSTDISABLE_CONTROL_BITFIELD Enable */ tmp =__raw_readl (EXYNOS5_ARM_COMMON_OPTION ); - tmp |= (EXYNOS5_MANUAL_L2RSTDISABLE_CONTROL | -EXYNOS5_SKIP_DEACTIVATE_ACEACP_IN_PWDN ); + tmp |=EXYNOS5_SKIP_DEACTIVATE_ACEACP_IN_PWDN ;__raw_writel (tmp,EXYNOS5_ARM_COMMON_OPTION );/*
arch/arm/mach-omap2/board-rx51-peripherals.c +2 -2
@@ -73,11 +73,11 @@#define LIS302_IRQ1_GPIO 181#define LIS302_IRQ2_GPIO 180/* Not yet in use */ -/* list all spi devices here */ +/* List all SPI devices here. Note that the list/probe order seems to matter! */ enum {RX51_SPI_WL1251 , -RX51_SPI_MIPID ,/* LCD panel */ RX51_SPI_TSC2005 ,/* Touch Controller */ +RX51_SPI_MIPID ,/* LCD panel */ };static struct wl12xx_platform_data wl1251_pdata;
arch/parisc/Makefile +9 -14
@@ -23,26 +23,21 @@ NM = sh $(srctree)/arch/parisc/nm CHECKFLAGS += -D__hppa__=1 LIBGCC = $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) -MACHINE := $(shell uname -m) -ifeq ($(MACHINE),parisc*) -NATIVE := 1 -endif - ifdef CONFIG_64BIT UTS_MACHINE := parisc64 CHECKFLAGS += -D__LP64__=1 -m64 -WIDTH := 64 +CC_ARCHES = hppa64 else # 32-bit -WIDTH := +CC_ARCHES = hppa hppa2.0 hppa1.1 endif -# attempt to help out folks who are cross-compiling -ifeq ($(NATIVE),1) -CROSS_COMPILE := hppa$(WIDTH)-linux- -else - ifeq ($(CROSS_COMPILE),) - CROSS_COMPILE := hppa$(WIDTH)-linux-gnu- - endif +ifneq ($(SUBARCH),$(UTS_MACHINE)) + ifeq ($(CROSS_COMPILE),) + CC_SUFFIXES = linux linux-gnu unknown-linux-gnu + CROSS_COMPILE := $(call cc-cross-prefix, \ + $(foreach a,$(CC_ARCHES), \ + $(foreach s,$(CC_SUFFIXES),$(a)-$(s)-))) + endif endif OBJCOPY_FLAGS =-O binary -R .note -R .comment -S
arch/parisc/kernel/entry.S +94 -78
380 lines not on this page · raw message
arch/powerpc/include/asm/rtas.h +2 -0
@@ -262,6 +262,8 @@ extern void rtas_progress(char *s, unsigned short hex);extern void rtas_initialize (void );extern int rtas_suspend_cpu (struct rtas_suspend_me_data *data);extern int rtas_suspend_last_cpu (struct rtas_suspend_me_data *data); +extern int rtas_online_cpus_mask (cpumask_var_t cpus); +extern int rtas_offline_cpus_mask (cpumask_var_t cpus);extern int rtas_ibm_suspend_me (struct rtas_args *);struct rtc_time ;
arch/powerpc/kernel/machine_kexec_64.c +4 -0
@@ -17,6 +17,7 @@#include <linux/errno.h> #include <linux/kernel.h> #include <linux/cpu.h> +#include <linux/hardirq.h> #include <asm/page.h> #include <asm/current.h>
@@ -335,10 +336,13 @@ void default_machine_kexec(struct kimage *image)pr_debug ("kexec: Starting switchover sequence.\n" );/* switch to a staticly allocated stack. Based on irq stack code. +* We setup preempt_count to avoid using VMX in memcpy. * XXX: the task struct will likely be invalid once we do the copy! */ kexec_stack.thread_info.task =current_thread_info ()->task; kexec_stack.thread_info.flags =0 ; + kexec_stack.thread_info.preempt_count =HARDIRQ_OFFSET ; + kexec_stack.thread_info.cpu =current_thread_info ()->cpu;/* We need a static PACA, too; copy this CPU's PACA over and switch to * it. Also poison per_cpu_offset to catch anyone using non-static
arch/powerpc/kernel/rtas.c +113 -0
148 lines not on this page · raw message
arch/powerpc/platforms/pseries/suspend.c +22 -0
@@ -16,6 +16,7 @@* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include <linux/cpu.h> #include <linux/delay.h> #include <linux/suspend.h> #include <linux/stat.h>
@@ -126,11 +127,15 @@ static ssize_t store_hibernate(struct device *dev,struct device_attribute *attr, const char *buf, size_t count) { + cpumask_var_t offline_mask;int rc;if (!capable (CAP_SYS_ADMIN ))return -EPERM ; +if (!alloc_cpumask_var (&offline_mask,GFP_TEMPORARY )) +return -ENOMEM ; + stream_id =simple_strtoul (buf,NULL ,16 ); do {
@@ -140,15 +145,32 @@ static ssize_t store_hibernate(struct device *dev, }while (rc == -EAGAIN );if (!rc) { +/* All present CPUs must be online */ +cpumask_andnot (offline_mask, cpu_present_mask, + cpu_online_mask); + rc =rtas_online_cpus_mask (offline_mask); +if (rc) { +pr_err ("%s: Could not bring present CPUs online.\n" , + __func__); + goto out; + } +stop_topology_update (); rc =pm_suspend (PM_SUSPEND_MEM );start_topology_update (); + +/* Take down CPUs not online prior to suspend */ +if (!rtas_offline_cpus_mask (offline_mask)) +pr_warn ("%s: Could not restore CPUs to offline " +"state.\n" , __func__); } stream_id =0 ;if (!rc) rc = count; +out: +free_cpumask_var (offline_mask);return rc; }
arch/tile/Kconfig +10 -4
@@ -368,11 +368,17 @@ config HARDWALL config KERNEL_PL int "Processor protection level for kernel" range 1 2 - default "1" + default 2 if TILEGX + default 1 if !TILEGX ---help--- - This setting determines the processor protection level the - kernel will be built to run at. Generally you should use - the default value here. + Since MDE 4.2, the Tilera hypervisor runs the kernel + at PL2 by default. If running under an older hypervisor, + or as a KVM guest, you must run at PL1. (The current + hypervisor may also be recompiled with "make HV_PL=2" to + allow it to run a kernel at PL1, but clients running at PL1 + are not expected to be supported indefinitely.) + + If you're not sure, don't change the default. source "arch/tile/gxio/Kconfig"
arch/tile/include/hv/hypervisor.h +24 -3
@@ -107,7 +107,22 @@#define HV_DISPATCH_ENTRY_SIZE 32/** Version of the hypervisor interface defined by this file */ -#define _HV_VERSION 11 +#define _HV_VERSION 13 + +/** Last version of the hypervisor interface with old hv_init() ABI. +* +* The change from version 12 to version 13 corresponds to launching +* the client by default at PL2 instead of PL1 (corresponding to the +* hv itself running at PL3 instead of PL2). To make this explicit, +* the hv_init() API was also extended so the client can report its +* desired PL, resulting in a more helpful failure diagnostic. If you +* call hv_init() with _HV_VERSION_OLD_HV_INIT and omit the client_pl +* argument, the hypervisor will assume client_pl = 1. +* +* Note that this is a deprecated solution and we do not expect to +* support clients of the Tilera hypervisor running at PL1 indefinitely. +*/ +#define _HV_VERSION_OLD_HV_INIT 12/* Index into hypervisor interface dispatch code blocks. *
@@ -377,7 +392,11 @@ typedef int HV_Errno;#ifndef __ASSEMBLER__/** Pass HV_VERSION to hv_init to request this version of the interface. */ -typedef enum {HV_VERSION = _HV_VERSION }HV_VersionNumber ; +typedef enum { +HV_VERSION = _HV_VERSION, +HV_VERSION_OLD_HV_INIT = _HV_VERSION_OLD_HV_INIT, + +}HV_VersionNumber ;/** Initializes the hypervisor. *
@@ -385,9 +404,11 @@ typedef enum { HV_VERSION = _HV_VERSION } HV_VersionNumber;* that this program expects, typically HV_VERSION. * @param chip_num Architecture number of the chip the client was built for. * @param chip_rev_num Revision number of the chip the client was built for. +* @param client_pl Privilege level the client is built for +* (not required if interface_version_number == HV_VERSION_OLD_HV_INIT). */ void hv_init (HV_VersionNumber interface_version_number, -int chip_num,int chip_rev_num); +int chip_num,int chip_rev_num,int client_pl);/** Queries we can make for hv_sysconf().
arch/tile/kernel/head_32.S +1 -1
@@ -38,7 +38,7 @@ ENTRY(_start) movei r2, TILE_CHIP_REV } { - moveli r0, _HV_VERSION + moveli r0, _HV_VERSION_OLD_HV_INIT jal hv_init } /* Get a reasonable default ASID in r0 */
arch/tile/kernel/head_64.S +9 -3
@@ -34,13 +34,19 @@ ENTRY(_start) /* Notify the hypervisor of what version of the API we want */ { +#if KERNEL_PL == 1 && _HV_VERSION == 13 + /* Support older hypervisors by asking for API version 12. */ + movei r0, _HV_VERSION_OLD_HV_INIT +#else + movei r0, _HV_VERSION +#endif movei r1, TILE_CHIP - movei r2, TILE_CHIP_REV } { - moveli r0, _HV_VERSION - jal hv_init + movei r2, TILE_CHIP_REV + movei r3, KERNEL_PL } + jal hv_init /* Get a reasonable default ASID in r0 */ { move r0, zero
arch/x86/Kconfig +0 -1
@@ -107,7 +107,6 @@ config X86 select GENERIC_CLOCKEVENTS_BROADCAST if X86_64 || (X86_32 && X86_LOCAL_APIC) select GENERIC_TIME_VSYSCALL if X86_64 select KTIME_SCALAR if X86_32 - select ALWAYS_USE_PERSISTENT_CLOCK select GENERIC_STRNCPY_FROM_USER select GENERIC_STRNLEN_USER select HAVE_CONTEXT_TRACKING if X86_64
arch/x86/kernel/microcode_intel_early.c +3 -2
@@ -487,6 +487,7 @@ static inline void show_saved_mc(void)#endif #if defined(CONFIG_MICROCODE_INTEL_EARLY ) && defined(CONFIG_HOTPLUG_CPU ) +static DEFINE_MUTEX (x86_cpu_microcode_mutex);/* * Save this mc into mc_saved_data. So it will be loaded early when a CPU is * hot added or resumes.
@@ -507,7 +508,7 @@ int save_mc_for_early(u8 *mc)* Hold hotplug lock so mc_saved_data is not accessed by a CPU in * hotplug. */ -cpu_hotplug_driver_lock (); +mutex_lock (&x86_cpu_microcode_mutex); mc_saved_count_init = mc_saved_data.mc_saved_count; mc_saved_count = mc_saved_data.mc_saved_count;
@@ -544,7 +545,7 @@ int save_mc_for_early(u8 *mc) } out: -cpu_hotplug_driver_unlock (); +mutex_unlock (&x86_cpu_microcode_mutex);return ret; }
arch/x86/kvm/emulate.c +41 -1
78 lines not on this page · raw message
arch/x86/kvm/vmx.c +6 -0
@@ -5197,6 +5197,12 @@ static int handle_invalid_guest_state(struct kvm_vcpu *vcpu)return 0 ; } +if (vcpu->arch.halt_request) { + vcpu->arch.halt_request =0 ; + ret =kvm_emulate_halt (vcpu); + goto out; + } +if (signal_pending (current)) goto out;if (need_resched ())
arch/x86/xen/enlighten.c +15 -0
@@ -156,6 +156,21 @@ static void xen_vcpu_setup(int cpu)BUG_ON (HYPERVISOR_shared_info == &xen_dummy_shared_info); +/* +* This path is called twice on PVHVM - first during bootup via +* smp_init -> xen_hvm_cpu_notify, and then if the VCPU is being +* hotplugged: cpu_up -> xen_hvm_cpu_notify. +* As we can only do the VCPUOP_register_vcpu_info once lets +* not over-write its result. +* +* For PV it is called during restore (xen_vcpu_restore) and bootup +* (xen_setup_vcpu_info_placement). The hotplug mechanism does not +* use this function. +*/ +if (xen_hvm_domain ()) { +if (per_cpu (xen_vcpu, cpu) == &per_cpu (xen_vcpu_info, cpu)) +return ; + }if (cpu <MAX_VIRT_CPUS )per_cpu (xen_vcpu,cpu) = &HYPERVISOR_shared_info->vcpu_info[cpu];
drivers/acpi/acpica/exfldio.c +13 -1
@@ -720,7 +720,19 @@ acpi_ex_extract_from_field(union acpi_operand_object *obj_desc,if ((obj_desc->common_field.start_field_bit_offset ==0 ) && (obj_desc->common_field.bit_length == access_bit_width)) { - status =acpi_ex_field_datum_io (obj_desc,0 , buffer,ACPI_READ ); +if (buffer_length >=sizeof (u64)) { + status = +acpi_ex_field_datum_io (obj_desc,0 , buffer, +ACPI_READ ); + }else { +/* Use raw_datum (u64) to handle buffers < 64 bits */ + + status = +acpi_ex_field_datum_io (obj_desc,0 , &raw_datum, +ACPI_READ ); +ACPI_MEMCPY (buffer, &raw_datum, buffer_length); + } +return_ACPI_STATUS (status); }
drivers/acpi/ec.c +1 -3
@@ -223,7 +223,7 @@ static int ec_check_sci_sync(struct acpi_ec *ec, u8 state)static int ec_poll (struct acpi_ec *ec) {unsigned long flags; -int repeat =2 ;/* number of command restarts */ +int repeat =5 ;/* number of command restarts */ while (repeat--) {unsigned long delay = jiffies +msecs_to_jiffies (ec_delay);
@@ -241,8 +241,6 @@ static int ec_poll(struct acpi_ec *ec) }advance_transaction (ec,acpi_ec_read_status (ec)); }while (time_before (jiffies, delay)); -if (acpi_ec_read_status (ec) &ACPI_EC_FLAG_IBF ) -break ;pr_debug (PREFIX "controller reset, restart transaction\n" );spin_lock_irqsave (&ec->lock, flags);start_transaction (ec);
drivers/block/drbd/drbd_main.c +1 -0
@@ -2795,6 +2795,7 @@ void drbd_free_bc(struct drbd_backing_dev *ldev)blkdev_put (ldev->backing_bdev,FMODE_READ |FMODE_WRITE |FMODE_EXCL );blkdev_put (ldev->md_bdev,FMODE_READ |FMODE_WRITE |FMODE_EXCL ); +kfree (ldev->disk_conf);kfree (ldev); }
drivers/block/drbd/drbd_receiver.c +2 -3
@@ -2661,7 +2661,6 @@ static int drbd_asb_recover_1p(struct drbd_conf *mdev) __must_hold(local)if (hg ==-1 && mdev->state.role ==R_PRIMARY ) {enum drbd_state_rv rv2; -drbd_set_role (mdev,R_SECONDARY ,0 );/* drbd_change_state() does not sleep while in SS_IN_TRANSIENT_STATE, * we might be here in C_WF_REPORT_PARAMS which is transient. * we do not need to wait for the after state change work either. */
@@ -4659,8 +4658,8 @@ static int drbd_do_features(struct drbd_tconn *tconn)#if !defined(CONFIG_CRYPTO_HMAC ) && !defined(CONFIG_CRYPTO_HMAC_MODULE )static int drbd_do_auth (struct drbd_tconn *tconn) { -dev_err (DEV ,"This kernel was build without CONFIG_CRYPTO_HMAC.\n" ); -dev_err (DEV ,"You need to disable 'cram-hmac-alg' in drbd.conf.\n" ); +conn_err (tconn,"This kernel was build without CONFIG_CRYPTO_HMAC.\n" ); +conn_err (tconn,"You need to disable 'cram-hmac-alg' in drbd.conf.\n" );return -1 ; }#else
drivers/char/ipmi/ipmi_bt_sm.c +2 -2
@@ -95,9 +95,9 @@ struct si_sm_data {enum bt_states state;unsigned char seq;/* BT sequence number */ struct si_sm_io *io; -unsigned char write_data[IPMI_MAX_MSG_LENGTH ]; +unsigned char write_data[IPMI_MAX_MSG_LENGTH +2 ];/* +2 for memcpy */ int write_count; -unsigned char read_data[IPMI_MAX_MSG_LENGTH ]; +unsigned char read_data[IPMI_MAX_MSG_LENGTH +2 ];/* +2 for memcpy */ int read_count;int truncated;long timeout;/* microseconds countdown */
drivers/char/ipmi/ipmi_devintf.c +13 -1
@@ -837,13 +837,25 @@ static long compat_ipmi_ioctl(struct file *filep, unsigned int cmd, return ipmi_ioctl(filep, cmd, arg); } } + +static long unlocked_compat_ipmi_ioctl (struct file *filep,unsigned int cmd, +unsigned long arg) +{ +int ret; + +mutex_lock (&ipmi_mutex); + ret =compat_ipmi_ioctl (filep, cmd, arg); +mutex_unlock (&ipmi_mutex); + +return ret; +}#endif static const struct file_operations ipmi_fops = { .owner =THIS_MODULE , .unlocked_ioctl = ipmi_unlocked_ioctl, #ifdef CONFIG_COMPAT - .compat_ioctl = compat_ipmi_ioctl, + .compat_ioctl = unlocked_compat_ipmi_ioctl, #endif .open = ipmi_open, .release = ipmi_release,
drivers/cpufreq/intel_pstate.c +19 -48
136 lines not on this page · raw message
drivers/dma/of-dma.c +6 -2
@@ -93,6 +93,7 @@ int of_dma_controller_register(struct device_node *np, {struct of_dma *ofdma;int nbcells; +const __be32 *prop;if (!np || !of_dma_xlate) {pr_err ("%s: not enough information provided\n" , __func__);
@@ -103,8 +104,11 @@ int of_dma_controller_register(struct device_node *np,if (!ofdma)return -ENOMEM ; - nbcells =be32_to_cpup (of_get_property (np,"#dma-cells" ,NULL )); -if (!nbcells) { + prop =of_get_property (np,"#dma-cells" ,NULL ); +if (prop) + nbcells =be32_to_cpup (prop); + +if (!prop || !nbcells) {pr_err ("%s: #dma-cells property is missing or invalid\n" , __func__);kfree (ofdma);
drivers/dma/pch_dma.c +1 -1
@@ -476,7 +476,7 @@ static struct pch_dma_desc *pdc_desc_get(struct pch_dma_chan *pd_chan)dev_dbg (chan2dev (&pd_chan->chan),"scanned %d descriptors\n" , i);if (!ret) { - ret =pdc_alloc_desc (&pd_chan->chan,GFP_NOIO ); + ret =pdc_alloc_desc (&pd_chan->chan,GFP_ATOMIC );if (ret) {spin_lock (&pd_chan->lock); pd_chan->descs_allocated++;
drivers/gpu/drm/drm_crtc.c +4 -0
@@ -78,6 +78,10 @@ void drm_warn_on_modeset_not_all_locked(struct drm_device *dev) {struct drm_crtc *crtc; +/* Locking is currently fubar in the panic handler. */ +if (oops_in_progress) +return ; +list_for_each_entry (crtc, &dev->mode_config.crtc_list, head)WARN_ON (!mutex_is_locked (&crtc->mutex));
drivers/gpu/drm/drm_mm.c +18 -16
@@ -755,33 +755,35 @@ void drm_mm_debug_table(struct drm_mm *mm, const char *prefix)EXPORT_SYMBOL (drm_mm_debug_table);#if defined(CONFIG_DEBUG_FS ) -int drm_mm_dump_table (struct seq_file *m,struct drm_mm *mm) +static unsigned long drm_mm_dump_hole (struct seq_file *m,struct drm_mm_node *entry) { -struct drm_mm_node *entry; -unsigned long total_used =0 , total_free =0 , total =0 ;unsigned long hole_start, hole_end, hole_size; - hole_start =drm_mm_hole_node_start (&mm->head_node); - hole_end =drm_mm_hole_node_end (&mm->head_node); - hole_size = hole_end - hole_start; -if (hole_size) +if (entry->hole_follows) { + hole_start =drm_mm_hole_node_start (entry); + hole_end =drm_mm_hole_node_end (entry); + hole_size = hole_end - hole_start;seq_printf (m,"0x%08lx-0x%08lx: 0x%08lx: free\n" , hole_start, hole_end, hole_size); - total_free += hole_size; +return hole_size; + } + +return 0 ; +} + +int drm_mm_dump_table (struct seq_file *m,struct drm_mm *mm) +{ +struct drm_mm_node *entry; +unsigned long total_used =0 , total_free =0 , total =0 ; + + total_free +=drm_mm_dump_hole (m, &mm->head_node);drm_mm_for_each_node (entry, mm) {seq_printf (m,"0x%08lx-0x%08lx: 0x%08lx: used\n" , entry->start, entry->start + entry->size, entry->size); total_used += entry->size; -if (entry->hole_follows) { - hole_start =drm_mm_hole_node_start (entry); - hole_end =drm_mm_hole_node_end (entry); - hole_size = hole_end - hole_start; -seq_printf (m,"0x%08lx-0x%08lx: 0x%08lx: free\n" , - hole_start, hole_end, hole_size); - total_free += hole_size; - } + total_free +=drm_mm_dump_hole (m, entry); } total = total_free + total_used;
drivers/gpu/drm/i915/intel_fb.c +14 -2
@@ -261,10 +261,22 @@ void intel_fbdev_fini(struct drm_device *dev)void intel_fbdev_set_suspend (struct drm_device *dev,int state) {drm_i915_private_t *dev_priv = dev->dev_private; -if (!dev_priv->fbdev) +struct intel_fbdev *ifbdev = dev_priv->fbdev; +struct fb_info *info; + +if (!ifbdev)return ; -fb_set_suspend (dev_priv->fbdev->helper.fbdev, state); + info = ifbdev->helper.fbdev; + +/* On resume from hibernation: If the object is shmemfs backed, it has +* been restored from swap. If the object is stolen however, it will be +* full of whatever garbage was left in there. +*/ +if (!state && ifbdev->ifb.obj->stolen) +memset_io (info->screen_base,0 , info->screen_size); + +fb_set_suspend (info, state); }MODULE_LICENSE ("GPL and additional rights" );
drivers/gpu/drm/mgag200/mgag200_mode.c +45 -24
203 lines not on this page · raw message
drivers/gpu/drm/radeon/r300_cmdbuf.c +1 -1
@@ -75,7 +75,7 @@ static int r300_emit_cliprects(drm_radeon_private_t *dev_priv,OUT_RING (CP_PACKET0 (R300_RE_CLIPRECT_TL_0 , nr *2 -1 ));for (i =0 ; i < nr; ++i) { -if (DRM_COPY_FROM_USER_UNCHECKED +if (DRM_COPY_FROM_USER (&box, &cmdbuf->boxes[n + i],sizeof (box))) {DRM_ERROR ("copy cliprect faulted\n" );return -EFAULT ;
drivers/gpu/drm/radeon/radeon_drv.c +11 -1
@@ -144,7 +144,7 @@ static inline void radeon_unregister_atpx_handler(void) {}#endif int radeon_no_wb; -int radeon_modeset =1 ; +int radeon_modeset =-1 ;int radeon_dynclks =-1 ;int radeon_r4xx_atom =0 ;int radeon_agpmode =0 ;
@@ -449,6 +449,16 @@ static struct pci_driver radeon_kms_pci_driver = {static int __init radeon_init (void ) { +#ifdef CONFIG_VGA_CONSOLE +if (vgacon_text_force () && radeon_modeset ==-1 ) { +DRM_INFO ("VGACON disable radeon kernel modesetting.\n" ); + radeon_modeset =0 ; + } +#endif +/* set to modesetting by default if not nomodeset */ +if (radeon_modeset ==-1 ) + radeon_modeset =1 ; +if (radeon_modeset ==1 ) {DRM_INFO ("radeon kernel modesetting enabled.\n" ); driver = &kms_driver;
drivers/hid/hid-core.c +1 -0
@@ -1702,6 +1702,7 @@ static const struct hid_device_id hid_have_special_driver[] = { { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_NAVIGATION_CONTROLLER) }, { HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_PS3_CONTROLLER) }, { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGX_MOUSE) }, + { HID_USB_DEVICE(USB_VENDOR_ID_SONY, USB_DEVICE_ID_SONY_VAIO_VGP_MOUSE) }, { HID_USB_DEVICE(USB_VENDOR_ID_STEELSERIES, USB_DEVICE_ID_STEELSERIES_SRWS1) }, { HID_USB_DEVICE(USB_VENDOR_ID_SUNPLUS, USB_DEVICE_ID_SUNPLUS_WDESKTOP) }, { HID_USB_DEVICE(USB_VENDOR_ID_THINGM, USB_DEVICE_ID_BLINK1) },
drivers/md/dm-bufio.c +23 -1
@@ -319,6 +319,9 @@ static void __cache_size_refresh(void)static void *alloc_buffer_data (struct dm_bufio_client *c,gfp_t gfp_mask,enum data_mode *data_mode) { +unsigned noio_flag; +void *ptr; +if (c->block_size <=DM_BUFIO_BLOCK_SIZE_SLAB_LIMIT ) { *data_mode =DATA_MODE_SLAB ;return kmem_cache_alloc (DM_BUFIO_CACHE (c), gfp_mask);
@@ -332,7 +335,26 @@ static void *alloc_buffer_data(struct dm_bufio_client *c, gfp_t gfp_mask, } *data_mode =DATA_MODE_VMALLOC ; -return __vmalloc (c->block_size, gfp_mask,PAGE_KERNEL ); + +/* +* __vmalloc allocates the data pages and auxiliary structures with +* gfp_flags that were specified, but pagetables are always allocated +* with GFP_KERNEL, no matter what was specified as gfp_mask. +* +* Consequently, we must set per-process flag PF_MEMALLOC_NOIO so that +* all allocations done by this process (including pagetables) are done +* as if GFP_NOIO was specified. +*/ + +if (gfp_mask & __GFP_NORETRY) + noio_flag =memalloc_noio_save (); + + ptr =__vmalloc (c->block_size, gfp_mask,PAGE_KERNEL ); + +if (gfp_mask & __GFP_NORETRY) +memalloc_noio_restore (noio_flag); + +return ptr; }/*
drivers/md/dm-cache-target.c +1 -0
@@ -1971,6 +1971,7 @@ static int cache_create(struct cache_args *ca, struct cache **result)atomic_set (&cache->nr_migrations,0 );init_waitqueue_head (&cache->migration_wait); + r = -ENOMEM ; cache->nr_dirty =0 ; cache->dirty_bitset =alloc_bitset (from_cblock (cache->cache_size));if (!cache->dirty_bitset) {
drivers/md/dm-snap.c +1 -0
@@ -1121,6 +1121,7 @@ static int snapshot_ctr(struct dm_target *ti, unsigned int argc, char **argv) s->pending_pool =mempool_create_slab_pool (MIN_IOS , pending_cache);if (!s->pending_pool) { ti->error ="Could not allocate mempool for pending exceptions" ; + r = -ENOMEM ; goto bad_pending_pool; }
drivers/md/dm-stripe.c +6 -5
@@ -94,7 +94,7 @@ static int get_stripe(struct dm_target *ti, struct stripe_c *sc,static int stripe_ctr (struct dm_target *ti,unsigned int argc,char **argv) {struct stripe_c *sc; -sector_t width; +sector_t width, tmp_len;uint32_t stripes;uint32_t chunk_size;int r;
@@ -116,15 +116,16 @@ static int stripe_ctr(struct dm_target *ti, unsigned int argc, char **argv) } width = ti->len; -if (sector_div (width, chunk_size)) { +if (sector_div (width, stripes)) { ti->error ="Target length not divisible by " -"chunk size" ; +"number of stripes" ;return -EINVAL ; } -if (sector_div (width, stripes)) { + tmp_len = width; +if (sector_div (tmp_len, chunk_size)) { ti->error ="Target length not divisible by " -"number of stripes" ; +"chunk size" ;return -EINVAL ; }
drivers/md/dm-table.c +1 -1
@@ -1442,7 +1442,7 @@ static bool dm_table_supports_write_same(struct dm_table *t)return false;if (!ti->type->iterate_devices || - !ti->type->iterate_devices (ti, device_not_write_same_capable,NULL )) + ti->type->iterate_devices (ti, device_not_write_same_capable,NULL ))return false; }
drivers/net/ethernet/3com/3c509.c +2 -0
@@ -306,6 +306,7 @@ static int el3_isa_match(struct device *pdev, unsigned int ndev)if (!dev)return -ENOMEM ; +SET_NETDEV_DEV (dev, pdev);netdev_boot_setup_check (dev);if (!request_region (ioaddr,EL3_IO_EXTENT ,"3c509-isa" )) {
@@ -595,6 +596,7 @@ static int __init el3_eisa_probe (struct device *device)return -ENOMEM ; } +SET_NETDEV_DEV (dev, device);netdev_boot_setup_check (dev);el3_dev_fill (dev, phys_addr, ioaddr, irq, if_port,EL3_EISA );
drivers/net/ethernet/3com/3c59x.c +14 -13
@@ -632,7 +632,6 @@ struct vortex_private { pm_state_valid:1, /* pci_dev->saved_config_space has sane contents */ open:1, medialock:1, - must_free_region:1, /* Flag: if zero, Cardbus owns the I/O region */ large_frames:1, /* accept large frames */ handling_irq:1; /* private in_irq indicator *//* {get|set}_wol operations are already serialized by rtnl.
@@ -951,7 +950,7 @@ static int vortex_eisa_remove(struct device *device)unregister_netdev (dev);iowrite16 (TotalReset|0x14 , ioaddr +EL3_CMD ); -release_region (dev->base_addr,VORTEX_TOTAL_SIZE ); +release_region (edev->base_addr,VORTEX_TOTAL_SIZE );free_netdev (dev);return 0 ;
@@ -1012,6 +1011,12 @@ static int vortex_init_one(struct pci_dev *pdev,if (rc <0 ) goto out; + rc =pci_request_regions (pdev,DRV_NAME ); +if (rc <0 ) { +pci_disable_device (pdev); + goto out; + } + unit = vortex_cards_found;if (global_use_mmio <0 && (unit >=MAX_UNITS || use_mmio[unit] <0 )) {
@@ -1027,6 +1032,7 @@ static int vortex_init_one(struct pci_dev *pdev,if (!ioaddr)/* If mapping fails, fall-back to BAR 0... */ ioaddr =pci_iomap (pdev,0 ,0 );if (!ioaddr) { +pci_release_regions (pdev);pci_disable_device (pdev); rc = -ENOMEM ; goto out;
@@ -1036,6 +1042,7 @@ static int vortex_init_one(struct pci_dev *pdev, ent->driver_data, unit);if (rc <0 ) {pci_iounmap (pdev, ioaddr); +pci_release_regions (pdev);pci_disable_device (pdev); goto out; }
@@ -1178,11 +1185,6 @@ static int vortex_probe1(struct device *gendev, void __iomem *ioaddr, int irq,/* PCI-only startup logic */ if (pdev) { -/* EISA resources already marked, so only PCI needs to do this here */ -/* Ignore return value, because Cardbus drivers already allocate for us */ -if (request_region (dev->base_addr, vci->io_size, print_name) !=NULL ) - vp->must_free_region =1 ; -/* enable bus-mastering if necessary */ if (vci->flags &PCI_USES_MASTER )pci_set_master (pdev);
@@ -1220,7 +1222,7 @@ static int vortex_probe1(struct device *gendev, void __iomem *ioaddr, int irq, &vp->rx_ring_dma); retval = -ENOMEM ;if (!vp->rx_ring) - goto free_region; + goto free_device; vp->tx_ring = (struct boom_tx_desc *)(vp->rx_ring +RX_RING_SIZE ); vp->tx_ring_dma = vp->rx_ring_dma +sizeof (struct boom_rx_desc ) *RX_RING_SIZE ;
@@ -1484,9 +1486,7 @@ free_ring: +sizeof (struct boom_tx_desc ) *TX_RING_SIZE , vp->rx_ring, vp->rx_ring_dma); -free_region: -if (vp->must_free_region) -release_region (dev->base_addr, vci->io_size); +free_device:free_netdev (dev);pr_err (PFX "vortex_probe1 fails. Returns %d\n" , retval); out:
@@ -3254,8 +3254,9 @@ static void vortex_remove_one(struct pci_dev *pdev) +sizeof (struct boom_tx_desc ) *TX_RING_SIZE , vp->rx_ring, vp->rx_ring_dma); -if (vp->must_free_region) -release_region (dev->base_addr, vp->io_size); + +pci_release_regions (pdev); +free_netdev (dev); }
drivers/net/ethernet/sfc/mcdi.c +1 -1
@@ -667,7 +667,7 @@ fail:int efx_mcdi_get_board_cfg (struct efx_nic *efx,u8 *mac_address,u16 *fw_subtype_list,u32 *capabilities) { -uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LENMIN ]; +uint8_t outbuf[MC_CMD_GET_BOARD_CFG_OUT_LENMAX ];size_t outlen, offset, i;int port_num =efx_port_num (efx);int rc;
drivers/net/ethernet/tile/tilegx.c +1 -1
@@ -930,7 +930,7 @@ static int tile_net_setup_interrupts(struct net_device *dev)if (info->has_iqueue) {gxio_mpipe_request_notif_ring_interrupt ( &context,cpu_x (cpu),cpu_y (cpu), -1 , ingress_irq, info->iqueue.ring); +KERNEL_PL , ingress_irq, info->iqueue.ring); } }
drivers/net/macvlan.c +4 -3
@@ -222,7 +222,8 @@ static rx_handler_result_t macvlan_handle_frame(struct sk_buff **pskb) }if (port->passthru) - vlan = list_first_entry(&port->vlans, struct macvlan_dev, list); + vlan =list_first_or_null_rcu (&port->vlans, + struct macvlan_dev, list);else vlan =macvlan_hash_lookup (port, eth->h_dest);if (vlan ==NULL )
@@ -807,7 +808,7 @@ int macvlan_common_newlink(struct net *src_net, struct net_device *dev,if (err <0 ) goto upper_dev_unlink; -list_add_tail (&vlan->list, &port->vlans); +list_add_tail_rcu (&vlan->list, &port->vlans);netif_stacked_transfer_operstate (lowerdev, dev);return 0 ;
@@ -835,7 +836,7 @@ void macvlan_dellink(struct net_device *dev, struct list_head *head) {struct macvlan_dev *vlan =netdev_priv (dev); -list_del (&vlan->list); +list_del_rcu (&vlan->list);unregister_netdevice_queue (dev, head);netdev_upper_dev_unlink (vlan->lowerdev, dev); }
drivers/net/tun.c +5 -2
@@ -1471,14 +1471,17 @@ static int tun_recvmsg(struct kiocb *iocb, struct socket *sock,if (!tun)return -EBADFD ; -if (flags & ~(MSG_DONTWAIT |MSG_TRUNC )) -return -EINVAL ; +if (flags & ~(MSG_DONTWAIT |MSG_TRUNC )) { + ret = -EINVAL ; + goto out; + } ret =tun_do_read (tun, tfile, iocb, m->msg_iov, total_len, flags &MSG_DONTWAIT );if (ret > total_len) { m->msg_flags |=MSG_TRUNC ; ret = flags &MSG_TRUNC ? ret : total_len; } +out:tun_put (tun);return ret; }
drivers/net/usb/asix_common.c +3 -0
@@ -100,6 +100,9 @@ int asix_rx_fixup_internal(struct usbnet *dev, struct sk_buff *skb,netdev_err (dev->net,"asix_rx_fixup() Bad RX Length %d\n" , rx->size);kfree_skb (rx->ax_skb); + rx->ax_skb =NULL ; + rx->size =0U ; +return 0 ; }
drivers/net/wireless/ath/ath9k/main.c +5 -1
@@ -1308,6 +1308,7 @@ static int ath9k_sta_add(struct ieee80211_hw *hw,struct ath_common *common =ath9k_hw_common (sc->sc_ah);struct ath_node *an = (struct ath_node *) sta->drv_priv;struct ieee80211_key_conf ps_key = { }; +int key;ath_node_attach (sc, sta, vif);
@@ -1315,7 +1316,9 @@ static int ath9k_sta_add(struct ieee80211_hw *hw, vif->type != NL80211_IFTYPE_AP_VLAN)return 0 ; - an->ps_key =ath_key_config (common, vif, sta, &ps_key); + key =ath_key_config (common, vif, sta, &ps_key); +if (key >0 ) + an->ps_key = key;return 0 ; }
@@ -1332,6 +1335,7 @@ static void ath9k_del_ps_key(struct ath_softc *sc,return ;ath_key_delete (common, &ps_key); + an->ps_key =0 ; } static int ath9k_sta_remove(struct ieee80211_hw *hw,
drivers/net/wireless/b43/dma.c +19 -0
@@ -1733,6 +1733,25 @@ drop_recycle_buffer:sync_descbuffer_for_device (ring, dmaaddr, ring->rx_buffersize); } +void b43_dma_handle_rx_overflow (struct b43_dmaring *ring) +{ +int current_slot, previous_slot; + +B43_WARN_ON (ring->tx); + +/* Device has filled all buffers, drop all packets and let TCP +* decrease speed. +* Decrement RX index by one will let the device to see all slots +* as free again +*/ +/* +*TODO: How to increase rx_drop in mac80211? +*/ + current_slot = ring->ops->get_current_rxslot (ring); + previous_slot =prev_slot (ring, current_slot); + ring->ops->set_current_rxslot (ring, previous_slot); +} +void b43_dma_rx (struct b43_dmaring *ring) {const struct b43_dma_ops *ops = ring->ops;
drivers/net/wireless/b43/dma.h +3 -1
@@ -9,7 +9,7 @@/* DMA-Interrupt reasons. */ #define B43_DMAIRQ_FATALMASK ((1 << 10) | (1 << 11) | (1 << 12) \ | (1 << 14) | (1 << 15)) -#define B43_DMAIRQ_NONFATALMASK (1 << 13) +#define B43_DMAIRQ_RDESC_UFLOW (1 << 13)#define B43_DMAIRQ_RX_DONE (1 << 16)/*** 32-bit DMA Engine. ***/
@@ -295,6 +295,8 @@ int b43_dma_tx(struct b43_wldev *dev,void b43_dma_handle_txstatus (struct b43_wldev *dev,const struct b43_txstatus *status); +void b43_dma_handle_rx_overflow (struct b43_dmaring *ring); +void b43_dma_rx (struct b43_dmaring *ring); void b43_dma_direct_fifo_rx(struct b43_wldev *dev,
drivers/net/wireless/b43/main.c +18 -25
68 lines not on this page · raw message
drivers/net/wireless/iwlegacy/4965-mac.c +1 -2
@@ -5740,8 +5740,7 @@ il4965_mac_setup_register(struct il_priv *il, u32 max_probe_length) hw->flags =IEEE80211_HW_SIGNAL_DBM |IEEE80211_HW_AMPDU_AGGREGATION |IEEE80211_HW_NEED_DTIM_BEFORE_ASSOC |IEEE80211_HW_SPECTRUM_MGMT | -IEEE80211_HW_REPORTS_TX_ACK_STATUS |IEEE80211_HW_SUPPORTS_PS | -IEEE80211_HW_SUPPORTS_DYNAMIC_PS ; +IEEE80211_HW_SUPPORTS_PS |IEEE80211_HW_SUPPORTS_DYNAMIC_PS ;if (il->cfg->sku &IL_SKU_N ) hw->flags |= IEEE80211_HW_SUPPORTS_DYNAMIC_SMPS |
drivers/net/wireless/mwifiex/cfg80211.c +0 -3
@@ -2280,9 +2280,6 @@ int mwifiex_del_virtual_intf(struct wiphy *wiphy, struct wireless_dev *wdev)if (wdev->netdev->reg_state ==NETREG_REGISTERED )unregister_netdevice (wdev->netdev); -if (wdev->netdev->reg_state ==NETREG_UNREGISTERED ) -free_netdev (wdev->netdev); -/* Clear the priv in adapter */ priv->netdev =NULL ;
drivers/net/wireless/mwifiex/cmdevt.c +1 -0
@@ -1176,6 +1176,7 @@ mwifiex_process_hs_config(struct mwifiex_adapter *adapter) adapter->if_ops.wakeup (adapter); adapter->hs_activated = false; adapter->is_hs_configured = false; + adapter->is_suspended = false;mwifiex_hs_activated_event (mwifiex_get_priv (adapter,MWIFIEX_BSS_ROLE_ANY ), false);
drivers/net/wireless/mwifiex/main.c +1 -0
@@ -646,6 +646,7 @@ void mwifiex_init_priv_params(struct mwifiex_private *priv, struct net_device *dev) { dev->netdev_ops = &mwifiex_netdev_ops; + dev->destructor = free_netdev;/* Initialize private structure */ priv->current_key_index =0 ; priv->media_connected = false;
drivers/net/wireless/mwifiex/sta_ioctl.c +6 -15
@@ -99,7 +99,7 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv, }else {/* Multicast */ priv->curr_pkt_filter &= ~HostCmd_ACT_MAC_PROMISCUOUS_ENABLE; -if (mcast_list->mode ==MWIFIEX_MULTICAST_MODE ) { +if (mcast_list->mode ==MWIFIEX_ALL_MULTI_MODE ) {dev_dbg (priv->adapter->dev,"info: Enabling All Multicast!\n" ); priv->curr_pkt_filter |=
@@ -111,20 +111,11 @@ int mwifiex_request_set_multicast_list(struct mwifiex_private *priv,dev_dbg (priv->adapter->dev,"info: Set multicast list=%d\n" , mcast_list->num_multicast_addr); -/* Set multicast addresses to firmware */ -if (old_pkt_filter == priv->curr_pkt_filter) { -/* Send request to firmware */ - ret =mwifiex_send_cmd_async (priv, - HostCmd_CMD_MAC_MULTICAST_ADR, - HostCmd_ACT_GEN_SET,0 , - mcast_list); - }else { -/* Send request to firmware */ - ret =mwifiex_send_cmd_async (priv, - HostCmd_CMD_MAC_MULTICAST_ADR, - HostCmd_ACT_GEN_SET,0 , - mcast_list); - } +/* Send multicast addresses to firmware */ + ret =mwifiex_send_cmd_async (priv, + HostCmd_CMD_MAC_MULTICAST_ADR, + HostCmd_ACT_GEN_SET,0 , + mcast_list); } } }
drivers/platform/x86/hp_accel.c +2 -1
@@ -362,7 +362,8 @@ static int lis3lv02d_suspend(struct device *dev)static int lis3lv02d_resume (struct device *dev) { -return lis3lv02d_poweron (&lis3_dev); +lis3lv02d_poweron (&lis3_dev); +return 0 ; } static SIMPLE_DEV_PM_OPS(hp_accel_pm, lis3lv02d_suspend, lis3lv02d_resume);
drivers/rtc/Kconfig +0 -2
@@ -20,7 +20,6 @@ if RTC_CLASS config RTC_HCTOSYS bool "Set system time from RTC on startup and resume" default y - depends on !ALWAYS_USE_PERSISTENT_CLOCK help If you say yes here, the system time (wall clock) will be set using the value read from a specified RTC device. This is useful to avoid
@@ -29,7 +28,6 @@ config RTC_HCTOSYS config RTC_SYSTOHC bool "Set the RTC time based on NTP synchronization" default y - depends on !ALWAYS_USE_PERSISTENT_CLOCK help If you say yes here, the system time (wall clock) will be stored in the RTC specified by RTC_HCTOSYS_DEVICE approximately every 11
drivers/rtc/rtc-pcf2123.c +1 -0
@@ -265,6 +265,7 @@ static int pcf2123_probe(struct spi_device *spi)if (!(rxbuf[0 ] &0x20 )) {dev_err (&spi->dev,"chip not found\n" ); + ret = -ENODEV ; goto kfree_exit; }
drivers/scsi/sd.c +20 -0
@@ -142,6 +142,7 @@ sd_store_cache_type(struct device *dev, struct device_attribute *attr,char *buffer_data;struct scsi_mode_data data;struct scsi_sense_hdr sshdr; +const char *temp ="temporary " ;int len;if (sdp->type !=TYPE_DISK )
@@ -150,6 +151,13 @@ sd_store_cache_type(struct device *dev, struct device_attribute *attr,* it's not worth the risk */ return -EINVAL ; +if (strncmp (buf, temp,sizeof (temp) -1 ) ==0 ) { + buf +=sizeof (temp) -1 ; + sdkp->cache_override =1 ; + }else { + sdkp->cache_override =0 ; + } +for (i =0 ; i <ARRAY_SIZE (sd_cache_types); i++) { len =strlen (sd_cache_types[i]); if (strncmp(sd_cache_types[i], buf, len) == 0 &&
@@ -162,6 +170,13 @@ sd_store_cache_type(struct device *dev, struct device_attribute *attr,return -EINVAL ; rcd = ct &0x01 ?1 :0 ; wce = ct &0x02 ?1 :0 ; + +if (sdkp->cache_override) { + sdkp->WCE = wce; + sdkp->RCD = rcd; +return count; + } +if (scsi_mode_sense (sdp,0x08 ,8 , buffer,sizeof (buffer),SD_TIMEOUT ,SD_MAX_RETRIES , &data,NULL ))return -EINVAL ;
@@ -2319,6 +2334,10 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer)int old_rcd = sdkp->RCD;int old_dpofua = sdkp->DPOFUA; + +if (sdkp->cache_override) +return ; + first_len =4 ;if (sdp->skip_ms_page_8) {if (sdp->type ==TYPE_RBC )
@@ -2812,6 +2831,7 @@ static void sd_probe_async(void *data, async_cookie_t cookie) sdkp->capacity =0 ; sdkp->media_present =1 ; sdkp->write_prot =0 ; + sdkp->cache_override =0 ; sdkp->WCE =0 ; sdkp->RCD =0 ; sdkp->ATO =0 ;
drivers/scsi/sd.h +1 -0
@@ -73,6 +73,7 @@ struct scsi_disk {u8 protection_type;/* Data Integrity Field */ u8 provisioning_mode; unsigned ATO : 1; /* state of disk ATO bit */ + unsigned cache_override : 1; /* temp override of WCE,RCD */ unsigned WCE : 1; /* state of disk WCE bit */ unsigned RCD : 1; /* state of disk RCD bit, unused */ unsigned DPOFUA : 1; /* state of disk DPOFUA bit */
drivers/target/iscsi/iscsi_target_erl1.c +4 -3
@@ -819,7 +819,7 @@ static int iscsit_attach_ooo_cmdsn(/* * CmdSN is greater than the tail of the list. */ -if (ooo_tail->cmdsn < ooo_cmdsn->cmdsn) +if (iscsi_sna_lt (ooo_tail->cmdsn, ooo_cmdsn->cmdsn))list_add_tail (&ooo_cmdsn->ooo_list, &sess->sess_ooo_cmdsn_list);else {
@@ -829,11 +829,12 @@ static int iscsit_attach_ooo_cmdsn(*/ list_for_each_entry (ooo_tmp, &sess->sess_ooo_cmdsn_list, ooo_list) { -if (ooo_tmp->cmdsn < ooo_cmdsn->cmdsn) +if (iscsi_sna_lt (ooo_tmp->cmdsn, ooo_cmdsn->cmdsn))continue ; +/* Insert before this entry */ list_add (&ooo_cmdsn->ooo_list, - &ooo_tmp->ooo_list); + ooo_tmp->ooo_list.prev);break ; } }
drivers/target/target_core_file.c +2 -8
@@ -148,13 +148,8 @@ static int fd_configure_device(struct se_device *dev)*/ inode = file->f_mapping->host;if (S_ISBLK (inode->i_mode)) { -struct request_queue *q =bdev_get_queue (inode->i_bdev);unsigned long long dev_size; - dev->dev_attrib.hw_block_size = -bdev_logical_block_size (inode->i_bdev); - dev->dev_attrib.hw_max_sectors =queue_max_hw_sectors (q); -/* * Determine the number of bytes from i_size_read() minus * one (1) logical sector from underlying struct block_device
@@ -173,13 +168,12 @@ static int fd_configure_device(struct se_device *dev) " block_device\n"); goto fail; } - - dev->dev_attrib.hw_block_size =FD_BLOCKSIZE ; - dev->dev_attrib.hw_max_sectors =FD_MAX_SECTORS ; } fd_dev->fd_block_size = dev->dev_attrib.hw_block_size; + dev->dev_attrib.hw_block_size =FD_BLOCKSIZE ; + dev->dev_attrib.hw_max_sectors =FD_MAX_SECTORS ; dev->dev_attrib.hw_queue_depth =FD_MAX_DEVICE_QUEUE_DEPTH ;if (fd_dev->fbd_flags &FDBD_HAS_BUFFERED_IO_WCE ) {
drivers/target/target_core_iblock.c +2 -0
@@ -679,6 +679,8 @@ iblock_execute_rw(struct se_cmd *cmd) rw =WRITE_FUA ; else if (!(q->flush_flags & REQ_FLUSH)) rw =WRITE_FUA ; + else + rw =WRITE ; }else { rw =WRITE ; }
drivers/target/target_core_transport.c +5 -6
@@ -2213,21 +2213,19 @@ static void target_release_cmd_kref(struct kref *kref) { struct se_cmd *se_cmd = container_of(kref, struct se_cmd, cmd_kref);struct se_session *se_sess = se_cmd->se_sess; -unsigned long flags; -spin_lock_irqsave (&se_sess->sess_cmd_lock, flags);if (list_empty (&se_cmd->se_cmd_list)) { -spin_unlock_irqrestore (&se_sess->sess_cmd_lock, flags); +spin_unlock (&se_sess->sess_cmd_lock); se_cmd->se_tfo->release_cmd (se_cmd);return ; }if (se_sess->sess_tearing_down && se_cmd->cmd_wait_set) { -spin_unlock_irqrestore (&se_sess->sess_cmd_lock, flags); +spin_unlock (&se_sess->sess_cmd_lock);complete (&se_cmd->cmd_wait_comp);return ; }list_del (&se_cmd->se_cmd_list); -spin_unlock_irqrestore (&se_sess->sess_cmd_lock, flags); +spin_unlock (&se_sess->sess_cmd_lock); se_cmd->se_tfo->release_cmd (se_cmd); }
@@ -2238,7 +2236,8 @@ static void target_release_cmd_kref(struct kref *kref)*/ int target_put_sess_cmd (struct se_session *se_sess,struct se_cmd *se_cmd) { -return kref_put (&se_cmd->cmd_kref, target_release_cmd_kref); +return kref_put_spinlock_irqsave (&se_cmd->cmd_kref, target_release_cmd_kref, + &se_sess->sess_cmd_lock); }EXPORT_SYMBOL (target_put_sess_cmd);
drivers/watchdog/watchdog_dev.c +2 -1
@@ -523,6 +523,7 @@ int watchdog_dev_register(struct watchdog_device *watchdog)int err, devno;if (watchdog->id ==0 ) { + old_wdd = watchdog; watchdog_miscdev.parent = watchdog->parent; err =misc_register (&watchdog_miscdev);if (err !=0 ) {
@@ -531,9 +532,9 @@ int watchdog_dev_register(struct watchdog_device *watchdog)if (err == -EBUSY )pr_err ("%s: a legacy watchdog module is probably present.\n" , watchdog->info->identity); + old_wdd =NULL ;return err; } - old_wdd = watchdog; }/* Fill in the data structures */
fs/ext4/mballoc.c +5 -1
@@ -1994,7 +1994,11 @@ repeat: group = ac->ac_g_ex.fe_group;for (i =0 ; i < ngroups; group++, i++) { -if (group == ngroups) +/* +* Artificially restricted ngroups for non-extent +* files makes group > ngroups possible on first loop. +*/ +if (group >= ngroups) group =0 ;/* This now checks without needing the buddy page */
fs/namei.c +1 -1
@@ -2740,7 +2740,7 @@ static int do_last(struct nameidata *nd, struct path *path,if (error)return error; -audit_inode (name, dir,0 ); +audit_inode (name, dir,LOOKUP_PARENT ); error = -EISDIR ;/* trailing slashes? */ if (nd->last.name[nd->last.len])
fs/nfsd/nfs4proc.c +13 -2
@@ -271,6 +271,7 @@ static __be32 do_open_fhandle(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_open *open) { __be32 status; +int accmode =0 ;/* We don't know the target directory, and therefore can not * set the change info
@@ -284,9 +285,19 @@ do_open_fhandle(struct svc_rqst *rqstp, struct svc_fh *current_fh, struct nfsd4_ open->op_truncate = (open->op_iattr.ia_valid &ATTR_SIZE ) && (open->op_iattr.ia_size ==0 ); +/* +* In the delegation case, the client is telling us about an +* open that it *already* performed locally, some time ago. We +* should let it succeed now if possible. +* +* In the case of a CLAIM_FH open, on the other hand, the client +* may be counting on us to enforce permissions (the Linux 4.1 +* client uses this for normal opens, for example). +*/ +if (open->op_claim_type ==NFS4_OPEN_CLAIM_DELEG_CUR_FH ) + accmode =NFSD_MAY_OWNER_OVERRIDE ; - status =do_open_permission (rqstp, current_fh, open, -NFSD_MAY_OWNER_OVERRIDE ); + status =do_open_permission (rqstp, current_fh, open, accmode);return status; }
fs/nfsd/nfs4recover.c +5 -7
@@ -146,7 +146,7 @@ out_no_tfm:* then disable recovery tracking. */ static void -legacy_recdir_name_error (int error) +legacy_recdir_name_error (struct nfs4_client *clp,int error) {printk (KERN_ERR "NFSD: unable to generate recoverydir " "name (%d).\n" , error);
@@ -159,9 +159,7 @@ legacy_recdir_name_error(int error)if (error == -ENOENT ) {printk (KERN_ERR "NFSD: disabling legacy clientid tracking. " "Reboot recovery will not function correctly!\n" ); - -/* the argument is ignored by the legacy exit function */ -nfsd4_client_tracking_exit (NULL ); +nfsd4_client_tracking_exit (clp->net); } }
@@ -184,7 +182,7 @@ nfsd4_create_clid_dir(struct nfs4_client *clp) status =nfs4_make_rec_clidname (dname, &clp->cl_name);if (status) -return legacy_recdir_name_error (status); +return legacy_recdir_name_error (clp, status); status =nfs4_save_creds (&original_cred);if (status <0 )
@@ -341,7 +339,7 @@ nfsd4_remove_clid_dir(struct nfs4_client *clp) status =nfs4_make_rec_clidname (dname, &clp->cl_name);if (status) -return legacy_recdir_name_error (status); +return legacy_recdir_name_error (clp, status); status =mnt_want_write_file (nn->rec_file);if (status)
@@ -601,7 +599,7 @@ nfsd4_check_legacy_client(struct nfs4_client *clp) status =nfs4_make_rec_clidname (dname, &clp->cl_name);if (status) { -legacy_recdir_name_error (status); +legacy_recdir_name_error (clp, status);return status; }
include/linux/audit.h +6 -1
@@ -120,7 +120,7 @@ static inline void audit_syscall_entry(int arch, int major, unsigned long a0, unsigned long a1, unsigned long a2, unsigned long a3) { - if (unlikely(!audit_dummy_context())) + if (unlikely(current->audit_context)) __audit_syscall_entry(arch, major, a0, a1, a2, a3); }static inline void audit_syscall_exit (void *pt_regs)
@@ -390,6 +390,11 @@ static inline void audit_ptrace(struct task_struct *t)#define audit_signals 0#endif /* CONFIG_AUDITSYSCALL */ +static inline bool audit_loginuid_set (struct task_struct *tsk) +{ +return uid_valid (audit_get_loginuid (tsk)); +} +#ifdef CONFIG_AUDIT /* These are defined in audit.c */ /* Public API */
include/linux/kref.h +33 -0
@@ -19,6 +19,7 @@#include <linux/atomic.h> #include <linux/kernel.h> #include <linux/mutex.h> +#include <linux/spinlock.h> struct kref {atomic_t refcount;
@@ -95,6 +96,38 @@ static inline int kref_put(struct kref *kref, void (*release)(struct kref *kref)return kref_sub (kref,1 , release); } +/** +* kref_put_spinlock_irqsave - decrement refcount for object. +* @kref: object. +* @release: pointer to the function that will clean up the object when the +* last reference to the object is released. +* This pointer is required, and it is not acceptable to pass kfree +* in as this function. +* @lock: lock to take in release case +* +* Behaves identical to kref_put with one exception. If the reference count +* drops to zero, the lock will be taken atomically wrt dropping the reference +* count. The release function has to call spin_unlock() without _irqrestore. +*/ +static inline int kref_put_spinlock_irqsave (struct kref *kref, +void (*release)(struct kref *kref), +spinlock_t *lock) +{ +unsigned long flags; + +WARN_ON (release ==NULL ); +if (atomic_add_unless (&kref->refcount,-1 ,1 )) +return 0 ; +spin_lock_irqsave (lock, flags); +if (atomic_dec_and_test (&kref->refcount)) { +release (kref); +local_irq_restore (flags); +return 1 ; + } +spin_unlock_irqrestore (lock, flags); +return 0 ; +} +static inline int kref_put_mutex (struct kref *kref,void (*release)(struct kref *kref),struct mutex *lock)
include/linux/time.h +0 -4
@@ -117,14 +117,10 @@ static inline bool timespec_valid_strict(const struct timespec *ts)extern bool persistent_clock_exist; -#ifdef ALWAYS_USE_PERSISTENT_CLOCK -#define has_persistent_clock () true -#else static inline bool has_persistent_clock (void ) {return persistent_clock_exist; } -#endif extern void read_persistent_clock (struct timespec *ts);extern void read_boot_clock (struct timespec *ts);
include/net/inet_frag.h +3 -2
@@ -135,14 +135,15 @@ static inline int sum_frag_mem_limit(struct netns_frags *nf)static inline void inet_frag_lru_move (struct inet_frag_queue *q) {spin_lock (&q->net->lru_lock); -list_move_tail (&q->lru_list, &q->net->lru_list); +if (!list_empty (&q->lru_list)) +list_move_tail (&q->lru_list, &q->net->lru_list);spin_unlock (&q->net->lru_lock); }static inline void inet_frag_lru_del (struct inet_frag_queue *q) {spin_lock (&q->net->lru_lock); -list_del (&q->lru_list); +list_del_init (&q->lru_list);spin_unlock (&q->net->lru_lock); }
include/net/sock.h +12 -0
@@ -865,6 +865,18 @@ struct inet_hashinfo;struct raw_hashinfo ;struct module ; +/* +* caches using SLAB_DESTROY_BY_RCU should let .next pointer from nulls nodes +* un-modified. Special care is taken when initializing object to zero. +*/ +static inline void sk_prot_clear_nulls (struct sock *sk,int size) +{ + if (offsetof(struct sock, sk_node.next) != 0) + memset(sk, 0, offsetof(struct sock, sk_node.next)); +memset (&sk->sk_node.pprev,0 , + size - offsetof(struct sock, sk_node.pprev)); +} +/* Networking protocol blocks we attach to sockets. * socket layer -> transport layer interface * transport -> network interface is defined by struct inet_proto
include/net/tcp.h +1 -0
@@ -1049,6 +1049,7 @@ static inline bool tcp_prequeue(struct sock *sk, struct sk_buff *skb) skb_queue_len(&tp->ucopy.prequeue) == 0)return false; +skb_dst_force (skb);__skb_queue_tail (&tp->ucopy.prequeue, skb); tp->ucopy.memory += skb->truesize;if (tp->ucopy.memory > sk->sk_rcvbuf) {
include/uapi/linux/audit.h +1 -0
@@ -246,6 +246,7 @@#define AUDIT_OBJ_TYPE 21#define AUDIT_OBJ_LEV_LOW 22#define AUDIT_OBJ_LEV_HIGH 23 +#define AUDIT_LOGINUID_SET 24/* These are ONLY useful when checking * at syscall exit time (AUDIT_AT_EXIT). */
include/uapi/linux/if_cablemodem.h +6 -6
@@ -12,11 +12,11 @@*/ /* some useful defines for sb1000.c e cmconfig.c - fv */ -#define SIOCGCMSTATS SIOCDEVPRIVATE+0/* get cable modem stats */ -#define SIOCGCMFIRMWARE SIOCDEVPRIVATE+1/* get cm firmware version */ -#define SIOCGCMFREQUENCY SIOCDEVPRIVATE+2/* get cable modem frequency */ -#define SIOCSCMFREQUENCY SIOCDEVPRIVATE+3/* set cable modem frequency */ -#define SIOCGCMPIDS SIOCDEVPRIVATE+4/* get cable modem PIDs */ -#define SIOCSCMPIDS SIOCDEVPRIVATE+5/* set cable modem PIDs */ +#define SIOCGCMSTATS (SIOCDEVPRIVATE+0)/* get cable modem stats */ +#define SIOCGCMFIRMWARE (SIOCDEVPRIVATE+1)/* get cm firmware version */ +#define SIOCGCMFREQUENCY (SIOCDEVPRIVATE+2)/* get cable modem frequency */ +#define SIOCSCMFREQUENCY (SIOCDEVPRIVATE+3)/* set cable modem frequency */ +#define SIOCGCMPIDS (SIOCDEVPRIVATE+4)/* get cable modem PIDs */ +#define SIOCSCMPIDS (SIOCDEVPRIVATE+5)/* set cable modem PIDs */ #endif
include/uapi/linux/virtio_net.h +1 -1
@@ -191,7 +191,7 @@ struct virtio_net_ctrl_mac {* specified. */ struct virtio_net_ctrl_mq { -u16 virtqueue_pairs; +__u16 virtqueue_pairs; };#define VIRTIO_NET_CTRL_MQ 4
ipc/shm.c +7 -1
@@ -493,7 +493,13 @@ static int newseg(struct ipc_namespace *ns, struct ipc_params *params)if (shmflg &SHM_HUGETLB ) {struct hstate *hs =hstate_sizelog ((shmflg >>SHM_HUGE_SHIFT ) &SHM_HUGE_MASK ); -size_t hugesize =ALIGN (size,huge_page_size (hs)); +size_t hugesize; + +if (!hs) { + error = -EINVAL ; + goto no_file; + } + hugesize =ALIGN (size,huge_page_size (hs));/* hugetlb_file_setup applies strict accounting */ if (shmflg &SHM_NORESERVE )
kernel/auditfilter.c +30 -1
@@ -345,6 +345,12 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule) f->uid =INVALID_UID ; f->gid =INVALID_GID ; +/* Support legacy tests for a valid loginuid */ +if ((f->type ==AUDIT_LOGINUID ) && (f->val ==4294967295U )) { + f->type =AUDIT_LOGINUID_SET ; + f->val =0 ; + } + err = -EINVAL ;if (f->op == Audit_bad) goto exit_free;
@@ -352,6 +358,12 @@ static struct audit_entry *audit_rule_to_entry(struct audit_rule *rule)switch (f->type) {default : goto exit_free; +case AUDIT_LOGINUID_SET : +if ((f->val !=0 ) && (f->val !=1 )) + goto exit_free; +if (f->op != Audit_not_equal && f->op != Audit_equal) + goto exit_free; +break ;case AUDIT_UID :case AUDIT_EUID :case AUDIT_SUID :
@@ -459,7 +471,20 @@ static struct audit_entry *audit_data_to_entry(struct audit_rule_data *data, f->gid =INVALID_GID ; f->lsm_str =NULL ; f->lsm_rule =NULL ; -switch (f->type) { + +/* Support legacy tests for a valid loginuid */ +if ((f->type ==AUDIT_LOGINUID ) && (f->val ==4294967295U )) { + f->type =AUDIT_LOGINUID_SET ; + f->val =0 ; + } + +switch (f->type) { +case AUDIT_LOGINUID_SET : +if ((f->val !=0 ) && (f->val !=1 )) + goto exit_free; +if (f->op != Audit_not_equal && f->op != Audit_equal) + goto exit_free; +break ;case AUDIT_UID :case AUDIT_EUID :case AUDIT_SUID :
@@ -1378,6 +1403,10 @@ static int audit_filter_user_rules(struct audit_krule *rule, result =audit_uid_comparator (audit_get_loginuid (current), f->op, f->uid);break ; +case AUDIT_LOGINUID_SET : + result =audit_comparator (audit_loginuid_set (current), + f->op, f->val); +break ;case AUDIT_SUBJ_USER :case AUDIT_SUBJ_ROLE :case AUDIT_SUBJ_TYPE :
kernel/auditsc.c +4 -1
@@ -742,6 +742,9 @@ static int audit_filter_rules(struct task_struct *tsk,if (ctx) result =audit_uid_comparator (tsk->loginuid, f->op, f->uid);break ; +case AUDIT_LOGINUID_SET : + result =audit_comparator (audit_loginuid_set (tsk), f->op, f->val); +break ;case AUDIT_SUBJ_USER :case AUDIT_SUBJ_ROLE :case AUDIT_SUBJ_TYPE :
@@ -2309,7 +2312,7 @@ int audit_set_loginuid(kuid_t loginuid)unsigned int sessionid;#ifdef CONFIG_AUDIT_LOGINUID_IMMUTABLE -if (uid_valid (task->loginuid)) +if (audit_loginuid_set (task))return -EPERM ;#else /* CONFIG_AUDIT_LOGINUID_IMMUTABLE */ if (!capable (CAP_AUDIT_CONTROL ))
kernel/kmod.c +5 -0
@@ -570,6 +570,11 @@ int call_usermodehelper_exec(struct subprocess_info *sub_info, int wait)int retval =0 ;helper_lock (); +if (!sub_info->path) { + retval = -EINVAL ; + goto out; + } +if (sub_info->path[0 ] =='\0' ) goto out;
kernel/sched/cputime.c +57 -13
100 lines not on this page · raw message
kernel/time/Kconfig +0 -5
@@ -12,11 +12,6 @@ config CLOCKSOURCE_WATCHDOG config ARCH_CLOCKSOURCE_DATA bool -# Platforms has a persistent clock -config ALWAYS_USE_PERSISTENT_CLOCK - bool - default n - # Timekeeping vsyscall support config GENERIC_TIME_VSYSCALL bool
kernel/time/tick-sched.c +1 -1
@@ -904,7 +904,7 @@ void tick_cancel_sched_timer(int cpu)hrtimer_cancel (&ts->sched_timer);# endif - ts->nohz_mode = NOHZ_MODE_INACTIVE; + memset(ts, 0, sizeof(*ts)); }#endif
kernel/timer.c +1 -1
@@ -1678,12 +1678,12 @@ static int __cpuinit init_timers_cpu(int cpu) boot_done =1 ; base = &boot_tvec_bases; } +spin_lock_init (&base->lock); tvec_base_done[cpu] =1 ; }else { base =per_cpu (tvec_bases, cpu); } -spin_lock_init (&base->lock);for (j =0 ; j <TVN_SIZE ; j++) {INIT_LIST_HEAD (base->tv5.vec + j);
kernel/trace/trace_events_filter.c +4 -0
@@ -777,7 +777,11 @@ static int filter_set_pred(struct event_filter *filter,static void __free_preds (struct event_filter *filter) { +int i; +if (filter->preds) { +for (i =0 ; i < filter->n_preds; i++) +kfree (filter->preds[i].ops);kfree (filter->preds); filter->preds =NULL ; }
mm/mmap.c +6 -2
@@ -1331,9 +1331,13 @@ SYSCALL_DEFINE6(mmap_pgoff, unsigned long, addr, unsigned long, len, len =ALIGN (len,huge_page_size (hstate_file (file))); }else if (flags &MAP_HUGETLB ) {struct user_struct *user =NULL ; +struct hstate *hs =hstate_sizelog ((flags >>MAP_HUGE_SHIFT ) & +SHM_HUGE_MASK ); - len =ALIGN (len,huge_page_size (hstate_sizelog ( - (flags >>MAP_HUGE_SHIFT ) &MAP_HUGE_MASK ))); +if (!hs) +return -EINVAL ; + + len =ALIGN (len,huge_page_size (hs));/* * VM_NORESERVE is used because the reservations will be * taken when vm_ops->mmap() is called
net/8021q/vlan_dev.c +1 -1
@@ -627,7 +627,7 @@ static netdev_features_t vlan_dev_fix_features(struct net_device *dev, netdev_features_t features) {struct net_device *real_dev =vlan_dev_priv (dev)->real_dev; -u32 old_features = features; +netdev_features_t old_features = features; features &= real_dev->vlan_features; features |=NETIF_F_RXCSUM ;
net/bridge/br_stp_timer.c +1 -1
@@ -107,7 +107,7 @@ static void br_tcn_timer_expired(unsigned long arg)br_debug (br,"tcn timer expired\n" );spin_lock (&br->lock); -if (br->dev->flags &IFF_UP ) { +if (!br_is_root_bridge (br) && (br->dev->flags &IFF_UP )) {br_transmit_tcn (br);mod_timer (&br->tcn_timer,jiffies + br->bridge_hello_time);
net/core/dev.c +1 -1
@@ -2458,7 +2458,7 @@ EXPORT_SYMBOL(netif_skb_features);* 2. skb is fragmented and the device does not support SG. */ static inline int skb_needs_linearize (struct sk_buff *skb, -int features) +netdev_features_t features) { return skb_is_nonlinear(skb) && ((skb_has_frag_list(skb) &&
net/core/ethtool.c +1 -1
@@ -1416,7 +1416,7 @@ int dev_ethtool(struct net *net, struct ifreq *ifr)void __user *useraddr = ifr->ifr_data;u32 ethcmd;int rc; -u32 old_features; +netdev_features_t old_features;if (!dev || !netif_device_present (dev))return -ENODEV ;
net/core/sock.c +0 -12
@@ -1209,18 +1209,6 @@ static void sock_copy(struct sock *nsk, const struct sock *osk)#endif } -/* -* caches using SLAB_DESTROY_BY_RCU should let .next pointer from nulls nodes -* un-modified. Special care is taken when initializing object to zero. -*/ -static inline void sk_prot_clear_nulls (struct sock *sk,int size) -{ - if (offsetof(struct sock, sk_node.next) != 0) - memset(sk, 0, offsetof(struct sock, sk_node.next)); -memset (&sk->sk_node.pprev,0 , - size - offsetof(struct sock, sk_node.pprev)); -} -void sk_prot_clear_portaddr_nulls (struct sock *sk,int size) {unsigned long nulls1, nulls2;
net/ipv4/inet_fragment.c +1 -0
@@ -257,6 +257,7 @@ static struct inet_frag_queue *inet_frag_alloc(struct netns_frags *nf,setup_timer (&q->timer, f->frag_expire, (unsigned long )q);spin_lock_init (&q->lock);atomic_set (&q->refcnt,1 ); +INIT_LIST_HEAD (&q->lru_list);return q; }
net/ipv4/tcp_minisocks.c +6 -1
@@ -583,8 +583,13 @@ struct sock *tcp_check_req(struct sock *sk, struct sk_buff *skb,* * Note that even if there is new data in the SYN packet * they will be thrown away too. +* +* Reset timer after retransmitting SYNACK, similar to +* the idea of fast retransmit in recovery. */ -inet_rtx_syn_ack (sk, req); +if (!inet_rtx_syn_ack (sk, req)) + req->expires =min (TCP_TIMEOUT_INIT << req->num_timeout, +TCP_RTO_MAX ) + jiffies;return NULL ; }
net/ipv6/ip6_gre.c +2 -0
@@ -1135,6 +1135,7 @@ static int ip6gre_tunnel_ioctl(struct net_device *dev, }if (t ==NULL ) t =netdev_priv (dev); +memset (&p,0 ,sizeof (p));ip6gre_tnl_parm_to_user (&p, &t->parms);if (copy_to_user (ifr->ifr_ifru.ifru_data, &p,sizeof (p))) err = -EFAULT ;
@@ -1182,6 +1183,7 @@ static int ip6gre_tunnel_ioctl(struct net_device *dev,if (t) { err =0 ; +memset (&p,0 ,sizeof (p));ip6gre_tnl_parm_to_user (&p, &t->parms);if (copy_to_user (ifr->ifr_ifru.ifru_data, &p,sizeof (p))) err = -EFAULT ;
net/ipv6/tcp_ipv6.c +12 -0
@@ -1937,6 +1937,17 @@ void tcp6_proc_exit(struct net *net) }#endif +static void tcp_v6_clear_sk (struct sock *sk,int size) +{ +struct inet_sock *inet =inet_sk (sk); + +/* we do not want to clear pinet6 field, because of RCU lookups */ +sk_prot_clear_nulls (sk, offsetof(struct inet_sock , pinet6)); + + size -= offsetof(struct inet_sock , pinet6) +sizeof (inet->pinet6); +memset (&inet->pinet6 +1 ,0 , size); +} +struct proto tcpv6_prot = { .name ="TCPv6" , .owner =THIS_MODULE ,
@@ -1980,6 +1991,7 @@ struct proto tcpv6_prot = { #ifdef CONFIG_MEMCG_KMEM .proto_cgroup = tcp_proto_cgroup, #endif + .clear_sk = tcp_v6_clear_sk, }; static const struct inet6_protocol tcpv6_protocol = {
net/ipv6/udp.c +12 -1
@@ -1422,6 +1422,17 @@ void udp6_proc_exit(struct net *net) { }#endif /* CONFIG_PROC_FS */ +void udp_v6_clear_sk (struct sock *sk,int size) +{ +struct inet_sock *inet =inet_sk (sk); + +/* we do not want to clear pinet6 field, because of RCU lookups */ +sk_prot_clear_portaddr_nulls (sk, offsetof(struct inet_sock , pinet6)); + + size -= offsetof(struct inet_sock , pinet6) +sizeof (inet->pinet6); +memset (&inet->pinet6 +1 ,0 , size); +} +/* ------------------------------------------------------------------------ */ struct proto udpv6_prot = {
@@ -1452,7 +1463,7 @@ struct proto udpv6_prot = { .compat_setsockopt = compat_udpv6_setsockopt, .compat_getsockopt = compat_udpv6_getsockopt, #endif - .clear_sk = sk_prot_clear_portaddr_nulls, + .clear_sk = udp_v6_clear_sk, }; static struct inet_protosw udpv6_protosw = {
net/ipv6/udp_impl.h +2 -0
@@ -31,6 +31,8 @@ extern int udpv6_recvmsg(struct kiocb *iocb, struct sock *sk,extern int udpv6_queue_rcv_skb (struct sock * sk,struct sk_buff *skb);extern void udpv6_destroy_sock (struct sock *sk); +extern void udp_v6_clear_sk (struct sock *sk,int size); +#ifdef CONFIG_PROC_FS extern int udp6_seq_show (struct seq_file *seq,void *v);#endif
net/ipv6/udplite.c +1 -1
@@ -56,7 +56,7 @@ struct proto udplitev6_prot = { .compat_setsockopt = compat_udpv6_setsockopt, .compat_getsockopt = compat_udpv6_getsockopt, #endif - .clear_sk = sk_prot_clear_portaddr_nulls, + .clear_sk = udp_v6_clear_sk, }; static struct inet_protosw udplite6_protosw = {
net/ipv6/xfrm6_policy.c +3 -1
@@ -103,8 +103,10 @@ static int xfrm6_fill_dst(struct xfrm_dst *xdst, struct net_device *dev,dev_hold (dev); xdst->u.rt6.rt6i_idev =in6_dev_get (dev); -if (!xdst->u.rt6.rt6i_idev) +if (!xdst->u.rt6.rt6i_idev) { +dev_put (dev);return -ENODEV ; + }rt6_transfer_peer (&xdst->u.rt6, rt);
net/mac802154/mac802154.h +1 -1
@@ -90,7 +90,7 @@ struct mac802154_sub_if_data {#define MAC802154_MAX_XMIT_ATTEMPTS 3 -#define MAC802154_CHAN_NONE (~(u8)0)/* No channel is assigned */ +#define MAC802154_CHAN_NONE 0xff/* No channel is assigned */ extern struct ieee802154_reduced_mlme_ops mac802154_mlme_reduced;extern struct ieee802154_mlme_ops mac802154_mlme_wpan;
net/packet/af_packet.c +23 -30
69 lines not on this page · raw message
net/sched/act_ipt.c +30 -3
@@ -8,7 +8,7 @@* as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. * -* Copyright: Jamal Hadi Salim (2002-4) +* Copyright: Jamal Hadi Salim (2002-13) */ #include <linux/types.h>
@@ -303,17 +303,44 @@ static struct tc_action_ops act_ipt_ops = { .walk = tcf_generic_walker }; -MODULE_AUTHOR ("Jamal Hadi Salim(2002-4)" ); +static struct tc_action_ops act_xt_ops = { + .kind ="xt" , + .hinfo = &ipt_hash_info, + .type =TCA_ACT_IPT , + .capab =TCA_CAP_NONE , + .owner =THIS_MODULE , + .act = tcf_ipt, + .dump = tcf_ipt_dump, + .cleanup = tcf_ipt_cleanup, + .lookup = tcf_hash_search, + .init = tcf_ipt_init, + .walk = tcf_generic_walker +}; + +MODULE_AUTHOR ("Jamal Hadi Salim(2002-13)" );MODULE_DESCRIPTION ("Iptables target actions" );MODULE_LICENSE ("GPL" ); +MODULE_ALIAS ("act_xt" );static int __init ipt_init_module (void ) { -return tcf_register_action (&act_ipt_ops); +int ret1, ret2; + ret1 =tcf_register_action (&act_xt_ops); +if (ret1 <0 ) +printk ("Failed to load xt action\n" ); + ret2 =tcf_register_action (&act_ipt_ops); +if (ret2 <0 ) +printk ("Failed to load ipt action\n" ); + +if (ret1 <0 && ret2 <0 ) +return ret1; +else +return 0 ; } static void __exit ipt_cleanup_module(void) { +tcf_unregister_action (&act_xt_ops);tcf_unregister_action (&act_ipt_ops); }
net/vmw_vsock/af_vsock.c +1 -1
@@ -165,7 +165,7 @@ static struct list_head vsock_bind_table[VSOCK_HASH_SIZE + 1];static struct list_head vsock_connected_table[VSOCK_HASH_SIZE ];static DEFINE_SPINLOCK (vsock_table_lock); -static __init void vsock_init_tables (void ) +static void vsock_init_tables (void ) {int i;
sound/pci/hda/hda_codec.c +5 -2
@@ -681,6 +681,9 @@ int snd_hda_queue_unsol_event(struct hda_bus *bus, u32 res, u32 res_ex)struct hda_bus_unsolicited *unsol;unsigned int wp; +if (!bus || !bus->workq) +return 0 ; +trace_hda_unsol_event (bus, res, res_ex); unsol = bus->unsol;if (!unsol)
@@ -1577,7 +1580,7 @@ void snd_hda_codec_setup_stream(struct hda_codec *codec, hda_nid_t nid,"NID=0x%x, stream=0x%x, channel=%d, format=0x%x\n" , nid, stream_tag, channel_id, format); p =get_hda_cvt_setup (codec, nid); -if (!p || p->active) +if (!p)return ;if (codec->pcm_format_first)
@@ -1624,7 +1627,7 @@ void __snd_hda_codec_cleanup_stream(struct hda_codec *codec, hda_nid_t nid,snd_printdd ("hda_codec_cleanup_stream: NID=0x%x\n" , nid); p =get_hda_cvt_setup (codec, nid); -if (p && p->active) { +if (p) {/* here we just clear the active flag when do_now isn't set;
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Part of the diff is not shown here. View the raw message.