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 <konrad.wilk@oracle.com> 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]
This commit is contained in:
@@ -399,13 +399,13 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
|
||||
down_write(&mm->mmap_sem);
|
||||
|
||||
vma = find_vma(mm, m.addr);
|
||||
ret = -EINVAL;
|
||||
if (!vma ||
|
||||
vma->vm_ops != &privcmd_vm_ops ||
|
||||
(m.addr != vma->vm_start) ||
|
||||
((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)) {
|
||||
@@ -429,12 +429,16 @@ static long privcmd_ioctl_mmap_batch(void __user *udata, int version)
|
||||
|
||||
up_write(&mm->mmap_sem);
|
||||
|
||||
if (state.global_error && (version == 1)) {
|
||||
/* Write back errors in second pass. */
|
||||
state.user_mfn = (xen_pfn_t *)m.arr;
|
||||
state.err = err_array;
|
||||
ret = traverse_pages(m.num, sizeof(xen_pfn_t),
|
||||
&pagelist, mmap_return_errors_v1, &state);
|
||||
if (version == 1) {
|
||||
if (state.global_error) {
|
||||
/* Write back errors in second pass. */
|
||||
state.user_mfn = (xen_pfn_t *)m.arr;
|
||||
state.err = err_array;
|
||||
ret = traverse_pages(m.num, sizeof(xen_pfn_t),
|
||||
&pagelist, mmap_return_errors_v1, &state);
|
||||
} else
|
||||
ret = 0;
|
||||
|
||||
} else if (version == 2) {
|
||||
ret = __copy_to_user(m.err, err_array, m.num * sizeof(int));
|
||||
if (ret)
|
||||
|
Reference in New Issue
Block a user