From: Konrad Rzeszutek Wilk Date: Tue, 15 Jan 2013 20:58:25 +0000 (-0500) Subject: Merge tag 'v3.7' into stable/for-linus-3.8 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7bcc1ec07748cae3552dc9b46701c117926c8923;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Merge tag 'v3.7' into stable/for-linus-3.8 Linux 3.7 * tag 'v3.7': (833 commits) Linux 3.7 Input: matrix-keymap - provide proper module license Revert "revert "Revert "mm: remove __GFP_NO_KSWAPD""" and associated damage ipv4: ip_check_defrag must not modify skb before unsharing Revert "mm: avoid waking kswapd for THP allocations when compaction is deferred or contended" inet_diag: validate port comparison byte code to prevent unsafe reads inet_diag: avoid unsafe and nonsensical prefix matches in inet_diag_bc_run() inet_diag: validate byte code to prevent oops in inet_diag_bc_run() inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state mm: vmscan: fix inappropriate zone congestion clearing vfs: fix O_DIRECT read past end of block device net: gro: fix possible panic in skb_gro_receive() tcp: bug fix Fast Open client retransmission tmpfs: fix shared mempolicy leak mm: vmscan: do not keep kswapd looping forever due to individual uncompactable zones mm: compaction: validate pfn range passed to isolate_freepages_block mmc: sh-mmcif: avoid oops on spurious interrupts (second try) Revert misapplied "mmc: sh-mmcif: avoid oops on spurious interrupts" mmc: sdhci-s3c: fix missing clock for gpio card-detect lib/Makefile: Fix oid_registry build dependency ... Signed-off-by: Konrad Rzeszutek Wilk Conflicts: arch/arm/xen/enlighten.c drivers/xen/Makefile [We need to have the v3.7 base as the 'for-3.8' was based off v3.7-rc3 and there are some patches in v3.7-rc6 that we to have in our branch] --- 7bcc1ec07748cae3552dc9b46701c117926c8923 diff --cc arch/arm/xen/enlighten.c index f28fc1ac8760,f57609275449..41a6a27128a2 --- a/arch/arm/xen/enlighten.c +++ b/arch/arm/xen/enlighten.c @@@ -247,3 -148,32 +247,15 @@@ static int __init xen_init_events(void return 0; } postcore_initcall(xen_init_events); + -/* XXX: only until balloon is properly working */ -int alloc_xenballooned_pages(int nr_pages, struct page **pages, bool highmem) -{ - *pages = alloc_pages(highmem ? GFP_HIGHUSER : GFP_KERNEL, - get_order(nr_pages)); - if (*pages == NULL) - return -ENOMEM; - return 0; -} -EXPORT_SYMBOL_GPL(alloc_xenballooned_pages); - -void free_xenballooned_pages(int nr_pages, struct page **pages) -{ - kfree(*pages); - *pages = NULL; -} -EXPORT_SYMBOL_GPL(free_xenballooned_pages); + + /* In the hypervisor.S file. */ + EXPORT_SYMBOL_GPL(HYPERVISOR_event_channel_op); + EXPORT_SYMBOL_GPL(HYPERVISOR_grant_table_op); + EXPORT_SYMBOL_GPL(HYPERVISOR_xen_version); + EXPORT_SYMBOL_GPL(HYPERVISOR_console_io); + EXPORT_SYMBOL_GPL(HYPERVISOR_sched_op); + EXPORT_SYMBOL_GPL(HYPERVISOR_hvm_op); + EXPORT_SYMBOL_GPL(HYPERVISOR_memory_op); + EXPORT_SYMBOL_GPL(HYPERVISOR_physdev_op); -EXPORT_SYMBOL_GPL(privcmd_call); ++EXPORT_SYMBOL_GPL(privcmd_call); diff --cc drivers/xen/Makefile index 3ee2b91ca4e0,74354708c6c4..fb213cf81a7b --- a/drivers/xen/Makefile +++ b/drivers/xen/Makefile @@@ -1,8 -1,9 +1,9 @@@ ifneq ($(CONFIG_ARM),y) -obj-y += manage.o balloon.o +obj-y += manage.o obj-$(CONFIG_HOTPLUG_CPU) += cpu_hotplug.o endif + obj-$(CONFIG_X86) += fallback.o -obj-y += grant-table.o features.o events.o +obj-y += grant-table.o features.o events.o balloon.o obj-y += xenbus/ nostackp := $(call cc-option, -fno-stack-protector) diff --cc drivers/xen/privcmd.c index f6316127f53f,71f5c459b088..421375a9196a --- a/drivers/xen/privcmd.c +++ b/drivers/xen/privcmd.c @@@ -406,15 -367,9 +405,16 @@@ static long privcmd_ioctl_mmap_batch(vo ((m.addr + (nr_pages << PAGE_SHIFT)) != vma->vm_end) || !privcmd_enforce_singleshot_mapping(vma)) { up_write(&mm->mmap_sem); + ret = -EINVAL; goto out; } + if (xen_feature(XENFEAT_auto_translated_physmap)) { + ret = alloc_empty_pages(vma, m.num); + if (ret < 0) { + up_write(&mm->mmap_sem); + goto out; + } + } state.domain = m.dom; state.vma = vma;