Patch "mm: Fix generic hugetlb pte check return type." has been added to the 3.10-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    mm: Fix generic hugetlb pte check return type.

to the 3.10-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mm-fix-generic-hugetlb-pte-check-return-type.patch
and it can be found in the queue-3.10 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From c92169cbbff72696875e310312a2273e44a65e24 Mon Sep 17 00:00:00 2001
From: David Miller <davem@xxxxxxxxxxxxx>
Date: Wed, 2 Oct 2013 14:25:09 -0400
Subject: mm: Fix generic hugetlb pte check return type.

From: David Miller <davem@xxxxxxxxxxxxx>

[ Upstream commit 26794942461f438a6bc725ec7294b08a6bd782c4 ]

The include/asm-generic/hugetlb.h stubs that just vector huge_pte_*()
calls to the pte_*() implementations won't work in certain situations.

x86 and sparc, for example, return "unsigned long" from the bit
checks, and just go "return pte_val(pte) & PTE_BIT_FOO;"

But since huge_pte_*() returns 'int', if any high bits on 64-bit are
relevant, they get chopped off.

The net effect is that we can loop forever trying to COW a huge page,
because the huge_pte_write() check signals false all the time.

Reported-by: Gurudas Pai <gurudas.pai@xxxxxxxxxx>
Tested-by: Gurudas Pai <gurudas.pai@xxxxxxxxxx>
Signed-off-by: David S. Miller <davem@xxxxxxxxxxxxx>
Acked-by: David Rientjes <rientjes@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 include/asm-generic/hugetlb.h |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- a/include/asm-generic/hugetlb.h
+++ b/include/asm-generic/hugetlb.h
@@ -6,12 +6,12 @@ static inline pte_t mk_huge_pte(struct p
 	return mk_pte(page, pgprot);
 }
 
-static inline int huge_pte_write(pte_t pte)
+static inline unsigned long huge_pte_write(pte_t pte)
 {
 	return pte_write(pte);
 }
 
-static inline int huge_pte_dirty(pte_t pte)
+static inline unsigned long huge_pte_dirty(pte_t pte)
 {
 	return pte_dirty(pte);
 }


Patches currently in stable-queue which might be from davem@xxxxxxxxxxxxx are

queue-3.10/tuntap-correctly-handle-error-in-tun_set_iff.patch
queue-3.10/net_sched-htb-fix-a-typo-in-htb_change_class.patch
queue-3.10/ip_tunnel-fix-a-memory-corruption-in-ip_tunnel_xmit.patch
queue-3.10/sparc32-fix-exit-flag-passed-from-traced-sys_sigreturn.patch
queue-3.10/resubmit-bridge-fix-message_age_timer-calculation.patch
queue-3.10/sparc64-fix-itlb-handler-of-null-page.patch
queue-3.10/ipv6-gre-correct-calculation-of-max_headroom.patch
queue-3.10/ll_temac-reset-dma-descriptors-indexes-on-ndo_open.patch
queue-3.10/tcp-add-missing-braces-to-do_tcp_setsockopt.patch
queue-3.10/ip-generate-unique-ip-identificator-if-local-fragmentation-is-allowed.patch
queue-3.10/ipv6-mcast-use-in6_dev_put-in-timer-handlers-instead-of-__in6_dev_put.patch
queue-3.10/mm-fix-generic-hugetlb-pte-check-return-type.patch
queue-3.10/net-sctp-rfc4443-do-not-report-icmp-redirects-to-user-space.patch
queue-3.10/ip-use-ip_hdr-in-__ip_make_skb-to-retrieve-ip-header.patch
queue-3.10/net-sctp-fix-ipv6-ipsec-encryption-bug-in-sctp_v6_xmit.patch
queue-3.10/r8169-enforce-rx_multi_en-for-the-8168f.patch
queue-3.10/ipv6-nat-do-not-drop-dnated-6to4-6rd-packets.patch
queue-3.10/bonding-fix-broken-promiscuity-reference-counting-issue.patch
queue-3.10/net-fix-multiqueue-selection.patch
queue-3.10/sparc-fix-ldom_reboot-buffer-overflow-harder.patch
queue-3.10/dm9601-fix-iff_allmulti-handling.patch
queue-3.10/xen-netback-count-number-required-slots-for-an-skb-more-carefully.patch
queue-3.10/net-sctp-fix-bug-in-sctp_poll-for-sock_select_err_queue.patch
queue-3.10/sparc64-fix-off-by-one-in-trampoline-tlb-mapping-installation-loop.patch
queue-3.10/net-fib-fib6_add-fix-potential-null-pointer-dereference.patch
queue-3.10/ipv6-exthdrs-accept-tlv-which-includes-only-padding.patch
queue-3.10/net-dccp-do-not-report-icmp-redirects-to-user-space.patch
queue-3.10/caif-add-missing-braces-to-multiline-if-in-cfctrl_linkup_request.patch
queue-3.10/bridge-clamp-forward_delay-when-enabling-stp.patch
queue-3.10/sparc64-fix-buggy-strlcpy-conversion-in-ldom_reboot.patch
queue-3.10/sit-allow-to-use-rtnl-ops-on-fb-tunnel.patch
queue-3.10/ipv6-udp-packets-following-an-ufo-enqueued-packet-need-also-be-handled-by-ufo.patch
queue-3.10/esp_scsi-fix-tag-state-corruption-when-autosensing.patch
queue-3.10/sparc64-remove-rwsem-export-leftovers.patch
queue-3.10/bridge-use-br_port_get_rtnl-within-rtnl-lock.patch
queue-3.10/bridge-fix-null-pointer-deref-of-br_port_get_rcu.patch
queue-3.10/sparc64-fix-not-sra-ed-o5-in-32-bit-traced-syscall.patch
queue-3.10/ipv4-igmp-use-in_dev_put-in-timer-handlers-instead-of-__in_dev_put.patch
queue-3.10/netpoll-fix-null-pointer-dereference-in-netpoll_cleanup.patch
queue-3.10/net-flow_dissector-fix-thoff-for-ipproto_ah.patch
queue-3.10/net-net_secret-should-not-depend-on-tcp.patch
queue-3.10/netpoll-should-handle-eth_p_arp-other-than-eth_p_ip-in-netpoll_neigh_reply.patch
queue-3.10/net-sctp-fix-smatch-warning-in-sctp_send_asconf_del_ip.patch
queue-3.10/via-rhine-fix-vlan-priority-field-pcp-ieee-802.1p.patch
queue-3.10/ip6_tunnels-raddr-and-laddr-are-inverted-in-nl-msg.patch
queue-3.10/ip6tnl-allow-to-use-rtnl-ops-on-fb-tunnel.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]