OSDN Git Service
Wei Wang [Fri, 7 Jul 2017 02:04:39 +0000 (20:04 -0600)]
net: ipv6: reset daddr and dport in socket if connect() fails
In __ip6_datagram_connect(), reset socket->socket_v6_daddr and inet->dport if
error occurs.
In udp_v6_early_demux(), check for socket_state to make sure it is in
TCP_ESTABLISHED state.
Together, it makes sure unconnected UDP socket won't be considered as a
valid candidate for early demux.
v3: add TCP_ESTABLISHED state check in udp_v6_early_demux()
v2: fix compilation error
CRs-Fixed:
2057820
Change-Id: Ifa9c2ddfaa5b51d4082b7b1dd8a5d03b3c290705
Fixes:
5425077d73e0 ("net: ipv6: Add early demux handler for UDP unicast")
Signed-off-by: Wei Wang <weiwan@google.com>
Acked-by: Maciej Żenczykowski <maze@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit:
85cb73ff9b74785a7fc752875d7f0fe17ca3ea7c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Subash Abhinov Kasiviswanathan [Fri, 7 Jul 2017 01:50:19 +0000 (19:50 -0600)]
net: ipv6: Fix UDP early demux lookup with udp_l3mdev_accept=0"
David Ahern reported that "net: ipv6: Add early demux
handler for UDP unicast" breaks udp_l3mdev_accept=0 since early
demux for IPv6 UDP was doing a generic socket lookup which does not
require an exact match. Fix this by making UDPv6 early demux match
connected sockets only.
v1->v2: Take reference to socket after match as suggested by Eric
v2->v3: Add comment before break
CRs-Fixed:
2057820
Change-Id: Ief9fd4a51561b7a49efa3780ebe8dc3632bdfa1c
Fixes:
5425077d73e0c ("net: ipv6: Add early demux handler for UDP unicast")
Reported-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>
Cc: Eric Dumazet <edumazet@google.com>
Acked-by: David Ahern <dsa@cumulusnetworks.com>
Tested-by: David Ahern <dsa@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Git-commit:
0bd84065b19bca12f07f288c8ea470e2c1b2de7a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[subashab@codeaurora.org: resolve trivial merge conflicts]
Linux Build Service Account [Wed, 12 Jul 2017 10:29:34 +0000 (03:29 -0700)]
Merge "cnss2: Set PCIe to D3hot state before suspending PCIe link"
Linux Build Service Account [Wed, 12 Jul 2017 10:29:33 +0000 (03:29 -0700)]
Merge "Merge android-4.4@
64a73ff (v4.4.76) into msm-4.4"
Linux Build Service Account [Wed, 12 Jul 2017 10:29:33 +0000 (03:29 -0700)]
Merge "ASoC: wsa881x: Assign device number in reset"
Linux Build Service Account [Wed, 12 Jul 2017 00:57:53 +0000 (17:57 -0700)]
Merge "drm/msm/sde: Expose the HDR support capability of the chipset"
Linux Build Service Account [Wed, 12 Jul 2017 00:57:52 +0000 (17:57 -0700)]
Merge "net: Kconfig: Add config entry for WLAN QCA6290 chipset"
Linux Build Service Account [Wed, 12 Jul 2017 00:57:52 +0000 (17:57 -0700)]
Merge "msm: isp: fix the issue during overflow recovery"
Linux Build Service Account [Wed, 12 Jul 2017 00:57:51 +0000 (17:57 -0700)]
Merge "USB: phy-msm-qusb-v2: Enable autoresume only when device is connected"
Linux Build Service Account [Wed, 12 Jul 2017 00:57:50 +0000 (17:57 -0700)]
Merge "ARM: dts: msm: Enable ACD functionality for sdm630 CPU rails"
Linux Build Service Account [Wed, 12 Jul 2017 00:57:49 +0000 (17:57 -0700)]
Merge "ASoC: msm_sdw: Move the delay logic inside bulk write loop"
Linux Build Service Account [Wed, 12 Jul 2017 00:57:48 +0000 (17:57 -0700)]
Merge "soc: qcom: SCM front-end over QCPE"
Yue Ma [Wed, 5 Apr 2017 19:30:33 +0000 (12:30 -0700)]
cnss2: Set PCIe to D3hot state before suspending PCIe link
As per PCIe spec, PCIe link needs to be set to D3hot state before
entering D3cold state.
Change-Id: I68defc4cf29fe88262e92fe8fb934948ad13aef4
CRs-fixed:
2059087
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Yue Ma [Thu, 20 Oct 2016 19:04:04 +0000 (12:04 -0700)]
net: Kconfig: Add config entry for WLAN QCA6290 chipset
WLAN QCA6290 chipset specific changes are featurized under
this config entry.
Change-Id: I9283ea5dcac702018b2483cdcd4aea254e96c51a
CRs-fixed:
2071634
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Linux Build Service Account [Tue, 11 Jul 2017 16:17:36 +0000 (09:17 -0700)]
Merge "ARM: dts: msm: add wlan carveout region for sdm660/sdm630"
Linux Build Service Account [Tue, 11 Jul 2017 16:17:35 +0000 (09:17 -0700)]
Merge "staging: android: sync: fix list corruption in fence struct"
Linux Build Service Account [Tue, 11 Jul 2017 16:17:34 +0000 (09:17 -0700)]
Merge "soc: qcom: Notify to app pd clients in ind_ack thread"
Linux Build Service Account [Tue, 11 Jul 2017 16:17:33 +0000 (09:17 -0700)]
Merge "fs/dcache.c: fix spin lockup issue on nlru->lock"
Linux Build Service Account [Tue, 11 Jul 2017 16:17:33 +0000 (09:17 -0700)]
Merge "mm/list_lru.c: fix list_lru_count_node() to be race free"
Linux Build Service Account [Tue, 11 Jul 2017 16:17:32 +0000 (09:17 -0700)]
Merge "msm: ipa: fix wrong usage and cleanup dead code"
Linux Build Service Account [Tue, 11 Jul 2017 16:17:31 +0000 (09:17 -0700)]
Merge "msm: ipa3: Verify IPA client id before using it"
Laxminath Kasam [Fri, 26 May 2017 14:39:52 +0000 (20:09 +0530)]
ASoC: msm_sdw: Move the delay logic inside bulk write loop
On consecutive writes in bulk write API, ensure delay
is provided for atleast 100us between each soundwire
master write for WR_DONE status update and reflect
current register value. Also ensure delay in soundwire
master read is present after register address update
and before register value read.
CRs-Fixed:
2035787
Change-Id: I8399c5ca32328abdd4e90b46d6f8d6a6c0225905
Signed-off-by: Laxminath Kasam <lkasam@codeaurora.org>
Linux Build Service Account [Tue, 11 Jul 2017 07:40:22 +0000 (00:40 -0700)]
Merge "Merge android-4.4@
8c91412 (v4.4.75) into msm-4.4"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:21 +0000 (00:40 -0700)]
Merge "mmc: core: Select HS mode in device first and then in the host"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:15 +0000 (00:40 -0700)]
Merge "mm/page_alloc: introduce post allocation processing on page allocator"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:13 +0000 (00:40 -0700)]
Merge "mm/page_owner: use stackdepot to store stacktrace"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:13 +0000 (00:40 -0700)]
Merge "mm/page_owner: introduce split_page_owner and replace manual handling"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:12 +0000 (00:40 -0700)]
Merge "lib/stackdepot: avoid to return 0 handle"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:12 +0000 (00:40 -0700)]
Merge "lib/stackdepot.c: allow the stack trace hash to be zero"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:11 +0000 (00:40 -0700)]
Merge "mm, kasan: stackdepot implementation. Enable stackdepot for SLAB"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:11 +0000 (00:40 -0700)]
Merge "mm/page_owner: copy last_migrate_reason in copy_page_owner()"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:10 +0000 (00:40 -0700)]
Merge "mm/page_owner: add zone range overlapping check"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:10 +0000 (00:40 -0700)]
Merge "mm, page_owner: dump page owner info from dump_page()"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:09 +0000 (00:40 -0700)]
Merge "mm, page_owner: track and print last migrate reason"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:09 +0000 (00:40 -0700)]
Merge "mm, page_owner: copy page owner info during migration"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:08 +0000 (00:40 -0700)]
Merge "mm, page_owner: convert page_owner_inited to static key"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:07 +0000 (00:40 -0700)]
Merge "mm, page_owner: print migratetype of page and pageblock, symbolic flags"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:07 +0000 (00:40 -0700)]
Merge "ARM: dts: msm: configure GPIO19 on msm8998 for 11ad refclk3"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:06 +0000 (00:40 -0700)]
Merge "power: reset: msm: Restore disabling SDI during reset"
Linux Build Service Account [Tue, 11 Jul 2017 07:40:05 +0000 (00:40 -0700)]
Merge "net: rps: reset backlog state when IPI fails."
Avaneesh Kumar Dwivedi [Wed, 26 Apr 2017 11:38:54 +0000 (17:08 +0530)]
soc: qcom: Notify to app pd clients in ind_ack thread
We have observed race condition between inquiring the remote pd state and
indication call back execution. They run asynchronously so we have no
control on their concurrent execution. So to achieve mutual exclusion,
moving the portion of code which result in race condition to indication
acknowledgment routine. Indication acknowledgment is send in separate
thread context which will avoid race condition.
Change-Id: Ib94f7ef4efd5de63fc8bededcf5cb6ae4ca2c3d8
Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org>
Srikanth Uyyala [Wed, 5 Jul 2017 14:59:55 +0000 (20:29 +0530)]
msm: isp: fix the issue during overflow recovery
When HAL3 is used undelivered requests are stored in request_queue
these requests need to be cleared during overflow recovery.
Change-Id: I733ba127abba8bfb70b3c727c7196adba2cb1973
Signed-off-by: Srikanth Uyyala <suyyala@codeaurora.org>
Tirupathi Reddy [Thu, 4 May 2017 17:22:34 +0000 (22:52 +0530)]
ARM: dts: msm: Enable ACD functionality for sdm630 CPU rails
The adaptive clock distribution (ACD) mitigates the impact of
high-frequency supply voltage (VDD) droops on microprocessor
performance. Program ACD functional configuration for both
Silver and Gold clusters of sdm630.
Also set VCTL_RAMP_EN & VCTL_RAMP_EN to 1 in SAW4_AVS_CTL.
CRs-Fixed:
2074210
Change-Id: I1f8021b8b436602b22a87d2036aebbfcf6840f58
Signed-off-by: Tirupathi Reddy <tirupath@codeaurora.org>
Sahitya Tummala [Fri, 30 Jun 2017 00:06:26 +0000 (00:06 +0000)]
fs/dcache.c: fix spin lockup issue on nlru->lock
__list_lru_walk_one() acquires nlru spin lock (nlru->lock) for longer
duration if there are more number of items in the lru list. As per the
current code, it can hold the spin lock for upto maximum UINT_MAX entries
at a time. So if there are more number of items in the lru list, then
"BUG: spinlock lockup suspected" is observed in the below path -
[<
ffffff8eca0fb0bc>] spin_bug+0x90
[<
ffffff8eca0fb220>] do_raw_spin_lock+0xfc
[<
ffffff8ecafb7798>] _raw_spin_lock+0x28
[<
ffffff8eca1ae884>] list_lru_add+0x28
[<
ffffff8eca1f5dac>] dput+0x1c8
[<
ffffff8eca1eb46c>] path_put+0x20
[<
ffffff8eca1eb73c>] terminate_walk+0x3c
[<
ffffff8eca1eee58>] path_lookupat+0x100
[<
ffffff8eca1f00fc>] filename_lookup+0x6c
[<
ffffff8eca1f0264>] user_path_at_empty+0x54
[<
ffffff8eca1e066c>] SyS_faccessat+0xd0
[<
ffffff8eca084e30>] el0_svc_naked+0x24
This nlru->lock is acquired by another CPU in this path -
[<
ffffff8eca1f5fd0>] d_lru_shrink_move+0x34
[<
ffffff8eca1f6180>] dentry_lru_isolate_shrink+0x48
[<
ffffff8eca1aeafc>] __list_lru_walk_one.isra.10+0x94
[<
ffffff8eca1aec34>] list_lru_walk_node+0x40
[<
ffffff8eca1f6620>] shrink_dcache_sb+0x60
[<
ffffff8eca1e56a8>] do_remount_sb+0xbc
[<
ffffff8eca1e583c>] do_emergency_remount+0xb0
[<
ffffff8eca0ba510>] process_one_work+0x228
[<
ffffff8eca0bb158>] worker_thread+0x2e0
[<
ffffff8eca0c040c>] kthread+0xf4
[<
ffffff8eca084dd0>] ret_from_fork+0x10
Fix this lockup by reducing the number of entries to be shrinked from the
lru list to 1024 at once. Also, add cond_resched() before processing the
lru list again.
Change-Id: I6df8d74cbc4c5ceac294f2d0784702cf096e84be
Link: http://marc.info/?t=149722864900001&r=1&w=2
Link: http://lkml.kernel.org/r/1498707575-2472-1-git-send-email-stummala@codeaurora.org
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Suggested-by: Jan Kara <jack@suse.cz>
Suggested-by: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Alexander Polakov <apolyakov@beget.ru>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: <stable@vger.kernel.org>
Patch-mainline: linux-mm @ 29/06/17, 09:09:35
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Sahitya Tummala [Fri, 30 Jun 2017 00:06:25 +0000 (00:06 +0000)]
mm/list_lru.c: fix list_lru_count_node() to be race free
list_lru_count_node() iterates over all memcgs to get the total number of
entries on the node but it can race with memcg_drain_all_list_lrus(),
which migrates the entries from a dead cgroup to another. This can return
incorrect number of entries from list_lru_count_node().
Fix this by keeping track of entries per node and simply return it in
list_lru_count_node().
Change-Id: I19e3b527804e95be75f48ee363c8207c0e7ee2ff
Link: http://lkml.kernel.org/r/1498707555-30525-1-git-send-email-stummala@codeaurora.org
Signed-off-by: Sahitya Tummala <stummala@codeaurora.org>
Cc: Jan Kara <jack@suse.cz>
Cc: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: Alexander Polakov <apolyakov@beget.ru>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Patch-mainline: linux-mm @ 29/06/17, 09:09:15
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Linux Build Service Account [Mon, 10 Jul 2017 21:09:14 +0000 (14:09 -0700)]
Merge "cnss2: Bypass SMMU stage-1 by default"
Srikanth Rajagopalan [Thu, 6 Jul 2017 05:08:52 +0000 (22:08 -0700)]
drm/msm/sde: Expose the HDR support capability of the chipset
Expose HDR capability using a property to the userspace.
This will help userspace to decide whether to invoke the HDR library
and pass the relevant parameters to be sent to the sink.
Change-Id: I3c4bf4d6c4e0f0babdf49b3c99baab42dcb2b5c0
Signed-off-by: Srikanth Rajagopalan <rasrik@codeaurora.org>
Amit Blay [Mon, 10 Jul 2017 15:30:20 +0000 (18:30 +0300)]
soc: qcom: SCM front-end over QCPE
This is an implementation of para-virtualized SCM driver.
This driver is the FE. The BE is QCPE running in an hypervisor.
The FE driver forwards SCM calls over HAB to the BE.
Change-Id: I88c269e856b0a6cc20b9ab8bf10110842d90a382
Signed-off-by: Amit Blay <ablay@codeaurora.org>
Charan Teja Reddy [Fri, 23 Jun 2017 07:54:40 +0000 (13:24 +0530)]
ARM: dts: msm: add wlan carveout region for sdm660/sdm630
Add WLAN carveout region of size 1MB. But additional guard of 1MB is
also added due to system limitations.
Change-Id: I1cd38f1ced820132209e31acc55a1321c879a09c
Signed-off-by: Charan Teja Reddy <charante@codeaurora.org>
Blagovest Kolenichev [Fri, 7 Jul 2017 21:19:25 +0000 (14:19 -0700)]
Merge android-4.4@
64a73ff (v4.4.76) into msm-4.4
* refs/heads/tmp-
64a73ff:
Linux 4.4.76
KVM: nVMX: Fix exception injection
KVM: x86: zero base3 of unusable segments
KVM: x86/vPMU: fix undefined shift in intel_pmu_refresh()
KVM: x86: fix emulation of RSM and IRET instructions
cpufreq: s3c2416: double free on driver init error path
iommu/amd: Fix incorrect error handling in amd_iommu_bind_pasid()
iommu: Handle default domain attach failure
iommu/vt-d: Don't over-free page table directories
ocfs2: o2hb: revert hb threshold to keep compatible
x86/mm: Fix flush_tlb_page() on Xen
x86/mpx: Correctly report do_mpx_bt_fault() failures to user-space
ARM: 8685/1: ensure memblock-limit is pmd-aligned
ARM64/ACPI: Fix BAD_MADT_GICC_ENTRY() macro implementation
sched/loadavg: Avoid loadavg spikes caused by delayed NO_HZ accounting
watchdog: bcm281xx: Fix use of uninitialized spinlock.
xfrm: Oops on error in pfkey_msg2xfrm_state()
xfrm: NULL dereference on allocation failure
xfrm: fix stack access out of bounds with CONFIG_XFRM_SUB_POLICY
jump label: fix passing kbuild_cflags when checking for asm goto support
ravb: Fix use-after-free on `ifconfig eth0 down`
sctp: check af before verify address in sctp_addr_id2transport
net/mlx4_core: Eliminate warning messages for SRQ_LIMIT under SRIOV
perf probe: Fix to show correct locations for events on modules
be2net: fix status check in be_cmd_pmac_add()
s390/ctl_reg: make __ctl_load a full memory barrier
swiotlb: ensure that page-sized mappings are page-aligned
coredump: Ensure proper size of sparse core files
x86/mpx: Use compatible types in comparison to fix sparse error
mac80211: initialize SMPS field in HT capabilities
spi: davinci: use dma_mapping_error()
scsi: lpfc: avoid double free of resource identifiers
HID: i2c-hid: Add sleep between POWER ON and RESET
kernel/panic.c: add missing \n
ibmveth: Add a proper check for the availability of the checksum features
vxlan: do not age static remote mac entries
virtio_net: fix PAGE_SIZE > 64k
vfio/spapr: fail tce_iommu_attach_group() when iommu_data is null
drm/amdgpu: check ring being ready before using
net: dsa: Check return value of phy_connect_direct()
amd-xgbe: Check xgbe_init() return code
platform/x86: ideapad-laptop: handle ACPI event 1
scsi: virtio_scsi: Reject commands when virtqueue is broken
xen-netfront: Fix Rx stall during network stress and OOM
swiotlb-xen: update dev_addr after swapping pages
virtio_console: fix a crash in config_work_handler
Btrfs: fix truncate down when no_holes feature is enabled
gianfar: Do not reuse pages from emergency reserve
powerpc/eeh: Enable IO path on permanent error
net: bgmac: Remove superflous netif_carrier_on()
net: bgmac: Start transmit queue in bgmac_open
net: bgmac: Fix SOF bit checking
bgmac: Fix reversed test of build_skb() return value.
mtd: bcm47xxpart: don't fail because of bit-flips
bgmac: fix a missing check for build_skb
mtd: bcm47xxpart: limit scanned flash area on BCM47XX (MIPS) only
MIPS: ralink: fix MT7628 wled_an pinmux gpio
MIPS: ralink: fix MT7628 pinmux typos
MIPS: ralink: Fix invalid assignment of SoC type
MIPS: ralink: fix USB frequency scaling
MIPS: ralink: MT7688 pinmux fixes
net: korina: Fix NAPI versus resources freeing
MIPS: ath79: fix regression in PCI window initialization
net: mvneta: Fix for_each_present_cpu usage
ARM: dts: BCM5301X: Correct GIC_PPI interrupt flags
qla2xxx: Fix erroneous invalid handle message
scsi: lpfc: Set elsiocb contexts to NULL after freeing it
scsi: sd: Fix wrong DPOFUA disable in sd_read_cache_type
KVM: x86: fix fixing of hypercalls
mm: numa: avoid waiting on freed migrated pages
block: fix module reference leak on put_disk() call for cgroups throttle
sysctl: enable strict writes
usb: gadget: f_fs: Fix possibe deadlock
drm/vmwgfx: Free hash table allocated by cmdbuf managed res mgr
ALSA: hda - set input_path bitmap to zero after moving it to new place
ALSA: hda - Fix endless loop of codec configure
MIPS: Fix IRQ tracing & lockdep when rescheduling
MIPS: pm-cps: Drop manual cache-line alignment of ready_count
MIPS: Avoid accidental raw backtrace
mm, swap_cgroup: reschedule when neeed in swap_cgroup_swapoff()
drm/ast: Handle configuration without P2A bridge
NFSv4: fix a reference leak caused WARNING messages
netfilter: synproxy: fix conntrackd interaction
netfilter: xt_TCPMSS: add more sanity tests on tcph->doff
rtnetlink: add IFLA_GROUP to ifla_policy
ipv6: Do not leak throw route references
sfc: provide dummy definitions of vswitch functions
net: 8021q: Fix one possible panic caused by BUG_ON in free_netdev
decnet: always not take dst->__refcnt when inserting dst into hash table
net/mlx5: Wait for FW readiness before initializing command interface
ipv6: fix calling in6_ifa_hold incorrectly for dad work
igmp: add a missing spin_lock_init()
igmp: acquire pmc lock for ip_mc_clear_src()
net: caif: Fix a sleep-in-atomic bug in cfpkt_create_pfx
Fix an intermittent pr_emerg warning about lo becoming free.
af_unix: Add sockaddr length checks before accessing sa_family in bind and connect handlers
net: Zero ifla_vf_info in rtnl_fill_vfinfo()
decnet: dn_rtmsg: Improve input length sanitization in dnrmg_receive_user_skb
net: don't call strlen on non-terminated string in dev_set_alias()
ipv6: release dst on error in ip6_dst_lookup_tail
UPSTREAM: selinux: enable genfscon labeling for tracefs
Change-Id: I05ae1d6271769a99ea3817e5066f5ab6511f3254
Signed-off-by: Blagovest Kolenichev <bkolenichev@codeaurora.org>
Akhil P Oommen [Wed, 7 Jun 2017 10:43:37 +0000 (16:13 +0530)]
staging: android: sync: fix list corruption in fence struct
Fence lock is not taken in sync_print_fence() while calling
sync_print_pt() which in turn calls fence_is_signaled() to check the
status of each fence before printing. This creates a race condition
that corrupts fence data structure when another thread calls
fence_is_signaled_locked() on the same fence. Since we don't need to
signal the fence while logging, it can be fixed by simply checking fence
flag status directly instead of calling fence_is_signaled_locked().
Change-Id: I1b4732cf3779a5b75a372e11170b438a4deabe67
Signed-off-by: Akhil P Oommen <akhilpo@codeaurora.org>
Sayali Lokhande [Wed, 5 Jul 2017 05:51:28 +0000 (11:21 +0530)]
mmc: core: Select HS mode in device first and then in the host
While switching from hs400 to hs200 mode, high speed mode
timing should be selected in the device before changing the
clock frequency in the host. But current implementation,
(mmc_hs400_to_hs200) first updates the frequency in the host
and then updates mode in the device. This is a spec violation.
Hence update the sequence to comply with the spec.
Change-Id: I0694edac9dd005ec68add9cc38bbe6fa4245ed48
Signed-off-by: Sayali Lokhande <sayalil@codeaurora.org>
Mohammed Javid [Wed, 5 Jul 2017 13:05:50 +0000 (18:35 +0530)]
msm: ipa: fix wrong usage and cleanup dead code
Couple of code cleanup
- remove dead code
- initialize local variables before use
- validate gsi_ep_cfg_ptr return
Change-Id: Ia2c2a5559fa2c5f89b33cc1ff897df0faa725e7e
Signed-off-by: Mohammed Javid <mjavid@codeaurora.org>
Linux Build Service Account [Mon, 10 Jul 2017 07:04:22 +0000 (00:04 -0700)]
Merge "i2c-msm-v2: Avoid accessing unassigned memory"
Shrey Vijay [Tue, 13 Jun 2017 07:38:25 +0000 (13:08 +0530)]
i2c-msm-v2: Avoid accessing unassigned memory
Memory translation fault occurs when incorrect memory
is accessed. To avoid translation fault, do not access
message memory which is not initialized.
Change-Id: Id5e89350a4bc51021964ee63286ea69040f1b32a
Signed-off-by: Shrey Vijay <shreyv@codeaurora.org>
Ashwanth Goli [Fri, 7 Jul 2017 07:45:13 +0000 (13:15 +0530)]
net: rps: reset backlog state when IPI fails.
Changes that reset remote cpu backlog state are removed with the
following commit. Adding them back.
I6e688bf0d09 ("net: rps: send out pending IPI's on CPU hotplug")
Change-Id: I436d1a1f185f0ddc375349e135bbb5d6eb8c5f26
Signed-off-by: Ashwanth Goli <ashwanth@codeaurora.org>
Neeraj Upadhyay [Mon, 10 Jul 2017 02:53:52 +0000 (08:23 +0530)]
power: reset: msm: Restore disabling SDI during reset
This reverts commit
b67bb93f565e ("power: reset: Do not
disable SDI during reset"), to restore the original
behavior of disabling SDI during reset.
Change-Id: I6ad0472dc5d766ffea2a942fc226fb742fe44242
Signed-off-by: Neeraj Upadhyay <neeraju@codeaurora.org>
Abhinav Kumar [Sun, 9 Jul 2017 17:51:11 +0000 (10:51 -0700)]
drm/msm: add input validation before setting HDR infoframe
Move the input validation for the connector's HDR support
before calling the API to set the infoframe rather than within
the API itself.
This helps to avoid redundant checks and logging.
Change-Id: If21562920edb1613a73b5e18ab258a57e46c1d7b
Signed-off-by: Abhinav Kumar <abhinavk@codeaurora.org>
Ghanim Fodi [Sun, 9 Jul 2017 10:24:17 +0000 (13:24 +0300)]
msm: ipa3: Verify IPA client id before using it
Verify IPA client ID is valid before using it to
access clients array for logging purposes. In case of
invalid id, do not access the array.
Change-Id: I7af6ee765a6d70d61721ac21b6a92ed53469b05a
CRs-fixed:
2051257
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Ghanim Fodi [Sun, 9 Jul 2017 09:09:11 +0000 (12:09 +0300)]
msm: ipa3: Protect access to ipa3_qmi_ctx variable by lock
ipa3_qmi_ctx is a global variable that may be accessed by
different worker threads. Protect the access to it
using mutex lock so that the access will be always atomic.
Change-Id: Iaf0c95d66817833c8e8123b12e94a7a01ab8df2c
CRs-fixed:
2056414
Signed-off-by: Ghanim Fodi <gfodi@codeaurora.org>
Maya Erez [Wed, 5 Jul 2017 11:26:45 +0000 (14:26 +0300)]
ARM: dts: msm: configure GPIO19 on msm8998 for 11ad refclk3
PMIC GPIO19 is used by 11ad device to control the refclk3,
while switching to slow clock.
Configure GPIO as input, no pull and VIN 1 for 1.8V source.
Change-Id: I89c04d70f1d8eff550b85d4fcb16bf08bf128ca7
Signed-off-by: Maya Erez <merez@codeaurora.org>
Linux Build Service Account [Sat, 8 Jul 2017 00:45:54 +0000 (17:45 -0700)]
Merge "icnss: Use fixed memory region for WLAN MSA0 memory"
Linux Build Service Account [Sat, 8 Jul 2017 00:45:53 +0000 (17:45 -0700)]
Merge "msm: mdss: information leak during buffer copy from userspace"
Linux Build Service Account [Sat, 8 Jul 2017 00:45:52 +0000 (17:45 -0700)]
Merge "msm: mdss: Increase fbmem buf ref count before use"
Linux Build Service Account [Sat, 8 Jul 2017 00:45:51 +0000 (17:45 -0700)]
Merge "mdss: dp: avoid notifying DP connect during AUX timeout cases"
Linux Build Service Account [Sat, 8 Jul 2017 00:45:50 +0000 (17:45 -0700)]
Merge "msm: mdss: Put smmu interface errors under pr_err"
Linux Build Service Account [Sat, 8 Jul 2017 00:45:49 +0000 (17:45 -0700)]
Merge "ARM: dts: msm: Support for adv7533 1024x600P panel resolution on msm8996"
Linux Build Service Account [Sat, 8 Jul 2017 00:45:49 +0000 (17:45 -0700)]
Merge "msm: mdss: Fix possible integer overflow"
Linux Build Service Account [Sat, 8 Jul 2017 00:45:47 +0000 (17:45 -0700)]
Merge "soc: qcom: ipc_router_mhi_xprt: Do not defer MHI open and close work"
Yue Ma [Wed, 1 Feb 2017 22:22:09 +0000 (14:22 -0800)]
cnss2: Bypass SMMU stage-1 by default
Bypass SMMU stage-1 till it is fully supported by WLAN driver and
device.
Change-Id: I186345c20f9b71171bba6acc8c5eaa689e39b51c
CRs-fixed:
2071634
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Yue Ma [Wed, 1 Feb 2017 01:53:57 +0000 (17:53 -0800)]
cnss2: Fix issues when migrating to msm-4.4 kernel
Fix the issues during migrating CNSS2 platform driver to msm-4.4
kernel.
Change-Id: Ifcef708fa9394ad54c92a26a397ec60631e74ef2
CRs-fixed:
2071634
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Yue Ma [Wed, 31 Aug 2016 23:36:11 +0000 (16:36 -0700)]
net: cnss2: Add snapshot of CNSS2 driver
This is a snapshot of the CNSS2 driver and associated files as
of msm-3.18 commit
c1bbe6d5e136 ("cnss2: Fix kernel checkpatch
issues").
Change-Id: Ia77d3abe3f86e4dbeac8d55ea2e0120bed480126
CRs-fixed:
2071634
Signed-off-by: Yue Ma <yuem@codeaurora.org>
Linux Build Service Account [Fri, 7 Jul 2017 15:32:00 +0000 (08:32 -0700)]
Merge "Revert "ARM: dts: msm: align removed_region with SDM630 memmap""
Linux Build Service Account [Fri, 7 Jul 2017 15:31:59 +0000 (08:31 -0700)]
Merge "icnss: Show rejuvenation info in ICNSS stats report"
Linux Build Service Account [Fri, 7 Jul 2017 15:31:58 +0000 (08:31 -0700)]
Merge "pwm: pwm-qpnp: Ignore changing period setting if it's not requested"
Linux Build Service Account [Fri, 7 Jul 2017 15:31:57 +0000 (08:31 -0700)]
Merge "msm: sensor: Fix to validate the settings size in flash"
Linux Build Service Account [Fri, 7 Jul 2017 15:31:56 +0000 (08:31 -0700)]
Merge "msm: camera: Unlock rwlock before returning."
Linux Build Service Account [Fri, 7 Jul 2017 15:31:56 +0000 (08:31 -0700)]
Merge "diag: Add proper checks to fix possible out-of-bound issue"
Hardik Kantilal Patel [Fri, 5 May 2017 11:27:48 +0000 (16:57 +0530)]
icnss: Use fixed memory region for WLAN MSA0 memory
During first time boot up WLAN Platform driver allocate
1 MB MSA0 Memory region. This region may be adjacent to
other regions that also requires access control, due to
that TZ will merge the two sections into one single resource
group. During this Q6 will lose access to memory region causing
a NOC Error. To avoid use fixed memory region for WLAN MSA0
memory.
CRs-Fixed:
2066025
Change-Id: Ie878e010954524bbe48a29d6ad6f2f53848ab25e
Signed-off-by: Hardik Kantilal Patel <hkpatel@codeaurora.org>
Joonsoo Kim [Tue, 26 Jul 2016 22:23:58 +0000 (15:23 -0700)]
mm/page_alloc: introduce post allocation processing on page allocator
This patch is motivated from Hugh and Vlastimil's concern [1].
There are two ways to get freepage from the allocator. One is using
normal memory allocation API and the other is __isolate_free_page()
which is internally used for compaction and pageblock isolation. Later
usage is rather tricky since it doesn't do whole post allocation
processing done by normal API.
One problematic thing I already know is that poisoned page would not be
checked if it is allocated by __isolate_free_page(). Perhaps, there
would be more.
We could add more debug logic for allocated page in the future and this
separation would cause more problem. I'd like to fix this situation at
this time. Solution is simple. This patch commonize some logic for
newly allocated page and uses it on all sites. This will solve the
problem.
[1] http://marc.info/?i=alpine.LSU.2.11.
1604270029350.7066%40eggly.anvils%3E
Change-Id: I601ec8ce8ee4ab76cd408ff2148dd8c73b959fc2
[iamjoonsoo.kim@lge.com: mm-page_alloc-introduce-post-allocation-processing-on-page-allocator-v3]
Link: http://lkml.kernel.org/r/1464230275-25791-7-git-send-email-iamjoonsoo.kim@lge.com
Link: http://lkml.kernel.org/r/1466150259-27727-9-git-send-email-iamjoonsoo.kim@lge.com
Link: http://lkml.kernel.org/r/1464230275-25791-7-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
46f24fd857b37bb86ddd5d0ac3d194e984dfdf1c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Joonsoo Kim [Tue, 26 Jul 2016 22:23:55 +0000 (15:23 -0700)]
mm/page_owner: use stackdepot to store stacktrace
Currently, we store each page's allocation stacktrace on corresponding
page_ext structure and it requires a lot of memory. This causes the
problem that memory tight system doesn't work well if page_owner is
enabled. Moreover, even with this large memory consumption, we cannot
get full stacktrace because we allocate memory at boot time and just
maintain 8 stacktrace slots to balance memory consumption. We could
increase it to more but it would make system unusable or change system
behaviour.
To solve the problem, this patch uses stackdepot to store stacktrace.
It obviously provides memory saving but there is a drawback that
stackdepot could fail.
stackdepot allocates memory at runtime so it could fail if system has
not enough memory. But, most of allocation stack are generated at very
early time and there are much memory at this time. So, failure would
not happen easily. And, one failure means that we miss just one page's
allocation stacktrace so it would not be a big problem. In this patch,
when memory allocation failure happens, we store special stracktrace
handle to the page that is failed to save stacktrace. With it, user can
guess memory usage properly even if failure happens.
Memory saving looks as following. (4GB memory system with page_owner)
(before the patch -> after the patch)
static allocation:
92274688 bytes ->
25165824 bytes
dynamic allocation after boot + kernel build:
0 bytes -> 327680 bytes
total:
92274688 bytes ->
25493504 bytes
72% reduction in total.
Note that implementation looks complex than someone would imagine
because there is recursion issue. stackdepot uses page allocator and
page_owner is called at page allocation. Using stackdepot in page_owner
could re-call page allcator and then page_owner. That is a recursion.
To detect and avoid it, whenever we obtain stacktrace, recursion is
checked and page_owner is set to dummy information if found. Dummy
information means that this page is allocated for page_owner feature
itself (such as stackdepot) and it's understandable behavior for user.
Change-Id: I9f96f1b527836a7577b1818a6a4fde7786e23a3b
[iamjoonsoo.kim@lge.com: mm-page_owner-use-stackdepot-to-store-stacktrace-v3]
Link: http://lkml.kernel.org/r/1464230275-25791-6-git-send-email-iamjoonsoo.kim@lge.com
Link: http://lkml.kernel.org/r/1466150259-27727-7-git-send-email-iamjoonsoo.kim@lge.com
Link: http://lkml.kernel.org/r/1464230275-25791-6-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
f2ca0b55710752588ccff5224a11e6aea43a996a
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Sudip Mukherjee [Fri, 24 Jun 2016 21:50:24 +0000 (14:50 -0700)]
mm/page_owner: avoid null pointer dereference
We have dereferenced page_ext before checking it. Lets check it first
and then used it.
Change-Id: I9184110069df51ddcf6eb699cb6ed2320fa09ab0
Fixes:
f86e4271978b ("mm: check the return value of lookup_page_ext for all call sites")
Link: http://lkml.kernel.org/r/1465249059-7883-1-git-send-email-sudipm.mukherjee@gmail.com
Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
8285027fc479949a7a166bc1b26ce57e894878a7
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Yang Shi [Fri, 3 Jun 2016 21:55:38 +0000 (14:55 -0700)]
mm: check the return value of lookup_page_ext for all call sites
Per the discussion with Joonsoo Kim [1], we need check the return value
of lookup_page_ext() for all call sites since it might return NULL in
some cases, although it is unlikely, i.e. memory hotplug.
Tested with ltp with "page_owner=0".
[1] http://lkml.kernel.org/r/
20160519002809.GA10245@js1304-P5Q-DELUXE
Change-Id: Ie0c577c1136a7f6f4e0fa2ceacfb007cd5323b8e
[akpm@linux-foundation.org: fix build-breaking typos]
[arnd@arndb.de: fix build problems from lookup_page_ext]
Link: http://lkml.kernel.org/r/6285269.2CksypHdYp@wuerfel
[akpm@linux-foundation.org: coding-style fixes]
Link: http://lkml.kernel.org/r/1464023768-31025-1-git-send-email-yang.shi@linaro.org
Signed-off-by: Yang Shi <yang.shi@linaro.org>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
f86e4271978bd93db466d6a95dad4b0fdcdb04f6
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Joonsoo Kim [Tue, 26 Jul 2016 22:23:52 +0000 (15:23 -0700)]
tools/vm/page_owner: increase temporary buffer size
Page owner will be changed to store more deep stacktrace so current
temporary buffer size isn't enough. Increase it.
Change-Id: Icd12608e87e9a91089c498faf3fc11054d79a87c
Link: http://lkml.kernel.org/r/1464230275-25791-5-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
371376750fce0abb09b1aa3fd8ae7025813a3488
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Joonsoo Kim [Tue, 26 Jul 2016 22:23:49 +0000 (15:23 -0700)]
mm/page_owner: introduce split_page_owner and replace manual handling
split_page() calls set_page_owner() to set up page_owner to each pages.
But, it has a drawback that head page and the others have different
stacktrace because callsite of set_page_owner() is slightly differnt.
To avoid this problem, this patch copies head page's page_owner to the
others. It needs to introduce new function, split_page_owner() but it
also remove the other function, get_page_owner_gfp() so looks good to
do.
Change-Id: Ie946ccf7dc1e9eeacb03ac81720c178daa7db21e
Link: http://lkml.kernel.org/r/1464230275-25791-4-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
a9627bc5e34e79ae80a33241b8a1501cc498e191
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Joonsoo Kim [Thu, 5 May 2016 23:22:35 +0000 (16:22 -0700)]
lib/stackdepot: avoid to return 0 handle
Recently, we allow to save the stacktrace whose hashed value is 0. It
causes the problem that stackdepot could return 0 even if in success.
User of stackdepot cannot distinguish whether it is success or not so we
need to solve this problem. In this patch, 1 bit are added to handle
and make valid handle none 0 by setting this bit. After that, valid
handle will not be 0 and 0 handle will represent failure correctly.
Change-Id: Id3294c839edd00c36569fb8507de17ff9c89baa9
Fixes:
33334e25769c ("lib/stackdepot.c: allow the stack trace hash to be zero")
Link: http://lkml.kernel.org/r/1462252403-1106-1-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
7c31190bcfdbff225950902a9f226e4eb79ca94f
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Alexander Potapenko [Thu, 28 Apr 2016 23:19:09 +0000 (16:19 -0700)]
lib/stackdepot.c: allow the stack trace hash to be zero
Do not bail out from depot_save_stack() if the stack trace has zero hash.
Initially depot_save_stack() silently dropped stack traces with zero
hashes, however there's actually no point in reserving this zero value.
Change-Id: Ie289b59e70633657cafbb794fd05fbe5725ead28
Reported-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Signed-off-by: Alexander Potapenko <glider@google.com>
Acked-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
33334e25769c6ad69b983379578f42581d99a2f9
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Samyukta Mogily [Tue, 4 Jul 2017 10:52:07 +0000 (16:22 +0530)]
msm: sensor: Fix to validate the settings size in flash
The size of the settings copied from userspace, is directly checked
in msm_cci_data_queue with CCI_I2C_MAX_WRITE. This might cause
out of bound access in function msm_cci_data_queue as the max size is
MAX_I2C_REG_SET. Hence adding check on the size in flash driver itself.
Change-Id: Ifac358be9f4b4ff60d14c20e02886c2d044e7f52
Signed-off-by: Samyukta Mogily <smogily@codeaurora.org>
Alexander Potapenko [Fri, 25 Mar 2016 21:22:08 +0000 (14:22 -0700)]
mm, kasan: stackdepot implementation. Enable stackdepot for SLAB
Implement the stack depot and provide CONFIG_STACKDEPOT. Stack depot
will allow KASAN store allocation/deallocation stack traces for memory
chunks. The stack traces are stored in a hash table and referenced by
handles which reside in the kasan_alloc_meta and kasan_free_meta
structures in the allocated memory chunks.
IRQ stack traces are cut below the IRQ entry point to avoid unnecessary
duplication.
Right now stackdepot support is only enabled in SLAB allocator. Once
KASAN features in SLAB are on par with those in SLUB we can switch SLUB
to stackdepot as well, thus removing the dependency on SLUB stack
bookkeeping, which wastes a lot of memory.
This patch is based on the "mm: kasan: stack depots" patch originally
prepared by Dmitry Chernenkov.
Joonsoo has said that he plans to reuse the stackdepot code for the
mm/page_owner.c debugging facility.
Change-Id: I5c92d30b394de78d68443eb4dbf0cb45537049ce
[akpm@linux-foundation.org: s/depot_stack_handle/depot_stack_handle_t]
[aryabinin@virtuozzo.com: comment style fixes]
Signed-off-by: Alexander Potapenko <glider@google.com>
Signed-off-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
Cc: Christoph Lameter <cl@linux.com>
Cc: Pekka Enberg <penberg@kernel.org>
Cc: David Rientjes <rientjes@google.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Andrey Konovalov <adech.fo@gmail.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Steven Rostedt <rostedt@goodmis.org>
Cc: Konstantin Serebryany <kcc@google.com>
Cc: Dmitry Chernenkov <dmitryc@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
[guptap@codeaurora.org: keep only stackdepot changes removed kasan
stackdepot enablement changes, as not required.
Reduce STACK_HASH_ORDER to 18, this is to limit kernel static size]
Git-commit:
cd11016e5f5212c13c0cec7384a525edc93b4921
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Joonsoo Kim [Tue, 26 Jul 2016 22:23:46 +0000 (15:23 -0700)]
mm/page_owner: copy last_migrate_reason in copy_page_owner()
Currently, copy_page_owner() doesn't copy all the owner information. It
skips last_migrate_reason because copy_page_owner() is used for
migration and it will be properly set soon. But, following patch will
use copy_page_owner() and this skip will cause the problem that
allocated page has uninitialied last_migrate_reason. To prevent it,
this patch also copy last_migrate_reason in copy_page_owner().
Change-Id: Ibaf1320c296f808098481a29bde3147390199b90
Link: http://lkml.kernel.org/r/1464230275-25791-3-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
a8efe1c982a22c95884dee1ddf2e721567d1f483
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Joonsoo Kim [Tue, 26 Jul 2016 22:23:43 +0000 (15:23 -0700)]
mm/page_owner: initialize page owner without holding the zone lock
It's not necessary to initialized page_owner with holding the zone lock.
It would cause more contention on the zone lock although it's not a big
problem since it is just debug feature. But, it is better than before
so do it. This is also preparation step to use stackdepot in page owner
feature. Stackdepot allocates new pages when there is no reserved space
and holding the zone lock in this case will cause deadlock.
Change-Id: Id96ab8444f194bead3fa4a8ddda30cdcca4ddc9f
Link: http://lkml.kernel.org/r/1464230275-25791-2-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
83358ece26b70f20c0ba2e0e00dc84b0ee24fe6d
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Joonsoo Kim [Fri, 20 May 2016 00:12:13 +0000 (17:12 -0700)]
mm/page_owner: add zone range overlapping check
There is a system thats node's pfns are overlapped as follows:
-----pfn-------->
N0 N1 N2 N0 N1 N2
Therefore, we need to care this overlapping when iterating pfn range.
There are one place in page_owner.c that iterates pfn range and it
doesn't consider this overlapping. Add it.
Without this patch, above system could over count early allocated page
number before page_owner is activated.
Change-Id: I2addf2fe2ae4d2b0d82b2dcbdcda37663daec0f3
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Rik van Riel <riel@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Laura Abbott <lauraa@codeaurora.org>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Michal Nazarewicz <mina86@mina86.com>
Cc: "Aneesh Kumar K.V" <aneesh.kumar@linux.vnet.ibm.com>
Cc: "Rafael J. Wysocki" <rjw@rjwysocki.net>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
9d43f5aec9506d98ad492a783aa8a18226c5d474
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Vlastimil Babka [Tue, 15 Mar 2016 21:56:21 +0000 (14:56 -0700)]
mm, page_owner: dump page owner info from dump_page()
The page_owner mechanism is useful for dealing with memory leaks. By
reading /sys/kernel/debug/page_owner one can determine the stack traces
leading to allocations of all pages, and find e.g. a buggy driver.
This information might be also potentially useful for debugging, such as
the VM_BUG_ON_PAGE() calls to dump_page(). So let's print the stored
info from dump_page().
Example output:
page:
ffffea000292f1c0 count:1 mapcount:0 mapping:
ffff8800b2f6cc18 index:0x91d
flags: 0x1fffff8001002c(referenced|uptodate|lru|mappedtodisk)
page dumped because: VM_BUG_ON_PAGE(1)
page->mem_cgroup:
ffff8801392c5000
page allocated via order 0, migratetype Movable, gfp_mask 0x24213ca(GFP_HIGHUSER_MOVABLE|__GFP_COLD|__GFP_NOWARN|__GFP_NORETRY)
[<
ffffffff811682c4>] __alloc_pages_nodemask+0x134/0x230
[<
ffffffff811b40c8>] alloc_pages_current+0x88/0x120
[<
ffffffff8115e386>] __page_cache_alloc+0xe6/0x120
[<
ffffffff8116ba6c>] __do_page_cache_readahead+0xdc/0x240
[<
ffffffff8116bd05>] ondemand_readahead+0x135/0x260
[<
ffffffff8116be9c>] page_cache_async_readahead+0x6c/0x70
[<
ffffffff811604c2>] generic_file_read_iter+0x3f2/0x760
[<
ffffffff811e0dc7>] __vfs_read+0xa7/0xd0
page has been migrated, last migrate reason: compaction
Change-Id: Ie5f3716ab34b3a66a00973f5d87360ebd0155348
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
4e462112e98f9ad6dd62e160f8b14c7df5fed2fc
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Vlastimil Babka [Tue, 15 Mar 2016 21:56:18 +0000 (14:56 -0700)]
mm, page_owner: track and print last migrate reason
During migration, page_owner info is now copied with the rest of the
page, so the stacktrace leading to free page allocation during migration
is overwritten. For debugging purposes, it might be however useful to
know that the page has been migrated since its initial allocation. This
might happen many times during the lifetime for different reasons and
fully tracking this, especially with stacktraces would incur extra
memory costs. As a compromise, store and print the migrate_reason of
the last migration that occurred to the page. This is enough to
distinguish compaction, numa balancing etc.
Example page_owner entry after the patch:
Page allocated via order 0, mask 0x24200ca(GFP_HIGHUSER_MOVABLE)
PFN 628753 type Movable Block 1228 type Movable Flags 0x1fffff80040030(dirty|lru|swapbacked)
[<
ffffffff811682c4>] __alloc_pages_nodemask+0x134/0x230
[<
ffffffff811b6325>] alloc_pages_vma+0xb5/0x250
[<
ffffffff81177491>] shmem_alloc_page+0x61/0x90
[<
ffffffff8117a438>] shmem_getpage_gfp+0x678/0x960
[<
ffffffff8117c2b9>] shmem_fallocate+0x329/0x440
[<
ffffffff811de600>] vfs_fallocate+0x140/0x230
[<
ffffffff811df434>] SyS_fallocate+0x44/0x70
[<
ffffffff8158cc2e>] entry_SYSCALL_64_fastpath+0x12/0x71
Page has been migrated, last migrate reason: compaction
Change-Id: I9c93f9f91fa71feaea1505d80ee56caf8daf5562
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Michal Hocko <mhocko@suse.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
7cd12b4abfd2f8f42414c520bbd051a5b7dc7a8c
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Joonsoo Kim [Tue, 26 Jul 2016 22:23:40 +0000 (15:23 -0700)]
mm/compaction: split freepages without holding the zone lock
We don't need to split freepages with holding the zone lock. It will
cause more contention on zone lock so not desirable.
Change-Id: Ifb1ee4e48e322abb25a9293885f68dfe75afb743
[rientjes@google.com: if __isolate_free_page() fails, avoid adding to freelist so we don't call map_pages() with it]
Link: http://lkml.kernel.org/r/alpine.DEB.2.10.1606211447001.43430@chino.kir.corp.google.com
Link: http://lkml.kernel.org/r/1464230275-25791-1-git-send-email-iamjoonsoo.kim@lge.com
Signed-off-by: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Mel Gorman <mgorman@techsingularity.net>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Alexander Potapenko <glider@google.com>
Cc: Hugh Dickins <hughd@google.com>
Cc: Michal Hocko <mhocko@kernel.org>
Signed-off-by: David Rientjes <rientjes@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
66c64223ad4e7a4a9161fcd9606426d9f57227ca
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Vlastimil Babka [Tue, 15 Mar 2016 21:56:15 +0000 (14:56 -0700)]
mm, page_owner: copy page owner info during migration
The page_owner mechanism stores gfp_flags of an allocation and stack
trace that lead to it. During page migration, the original information
is practically replaced by the allocation of free page as the migration
target. Arguably this is less useful and might lead to all the
page_owner info for migratable pages gradually converge towards
compaction or numa balancing migrations. It has also lead to
inaccuracies such as one fixed by commit
e2cfc91120fa ("mm/page_owner:
set correct gfp_mask on page_owner").
This patch thus introduces copying the page_owner info during migration.
However, since the fact that the page has been migrated from its
original place might be useful for debugging, the next patch will
introduce a way to track that information as well.
Change-Id: I4eb94be5fb2c93bbf165edb9f2a80091b5c8d7b1
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
d435edca928805074dae005ab9a42d9fa60fc702
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Vlastimil Babka [Tue, 15 Mar 2016 21:56:12 +0000 (14:56 -0700)]
mm, page_owner: convert page_owner_inited to static key
CONFIG_PAGE_OWNER attempts to impose negligible runtime overhead when
enabled during compilation, but not actually enabled during runtime by
boot param page_owner=on. This overhead can be further reduced using
the static key mechanism, which this patch does.
Change-Id: I76e44d92ed973647d4fd6489f97db5ffeb893354
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
7dd80b8af0bcd705a9ef2fa272c082882616a499
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Vlastimil Babka [Tue, 15 Mar 2016 21:56:08 +0000 (14:56 -0700)]
mm, page_owner: print migratetype of page and pageblock, symbolic flags
The information in /sys/kernel/debug/page_owner includes the migratetype
of the pageblock the page belongs to. This is also checked against the
page's migratetype (as declared by gfp_flags during its allocation), and
the page is reported as Fallback if its migratetype differs from the
pageblock's one. t This is somewhat misleading because in fact fallback
allocation is not the only reason why these two can differ. It also
doesn't direcly provide the page's migratetype, although it's possible
to derive that from the gfp_flags.
It's arguably better to print both page and pageblock's migratetype and
leave the interpretation to the consumer than to suggest fallback
allocation as the only possible reason. While at it, we can print the
migratetypes as string the same way as /proc/pagetypeinfo does, as some
of the numeric values depend on kernel configuration. For that, this
patch moves the migratetype_names array from #ifdef CONFIG_PROC_FS part
of mm/vmstat.c to mm/page_alloc.c and exports it.
With the new format strings for flags, we can now also provide symbolic
page and gfp flags in the /sys/kernel/debug/page_owner file. This
replaces the positional printing of page flags as single letters, which
might have looked nicer, but was limited to a subset of flags, and
required the user to remember the letters.
Example page_owner entry after the patch:
Page allocated via order 0, mask 0x24213ca(GFP_HIGHUSER_MOVABLE|__GFP_COLD|__GFP_NOWARN|__GFP_NORETRY)
PFN 520 type Movable Block 1 type Movable Flags 0xfffff8001006c(referenced|uptodate|lru|active|mappedtodisk)
[<
ffffffff811682c4>] __alloc_pages_nodemask+0x134/0x230
[<
ffffffff811b4058>] alloc_pages_current+0x88/0x120
[<
ffffffff8115e386>] __page_cache_alloc+0xe6/0x120
[<
ffffffff8116ba6c>] __do_page_cache_readahead+0xdc/0x240
[<
ffffffff8116bd05>] ondemand_readahead+0x135/0x260
[<
ffffffff8116bfb1>] page_cache_sync_readahead+0x31/0x50
[<
ffffffff81160523>] generic_file_read_iter+0x453/0x760
[<
ffffffff811e0d57>] __vfs_read+0xa7/0xd0
Change-Id: I08f3412dbda9075d5534eee81444843a7679e54e
Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
Acked-by: Michal Hocko <mhocko@suse.com>
Cc: Joonsoo Kim <iamjoonsoo.kim@lge.com>
Cc: Minchan Kim <minchan@kernel.org>
Cc: Sasha Levin <sasha.levin@oracle.com>
Cc: "Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Cc: Mel Gorman <mgorman@suse.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Git-commit:
60f30350fd69a3e4d5f0f45937d3274c22565134
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
[guptap@codeaurora.org: resolve trivial merge conflicts]
Signed-off-by: Prakash Gupta <guptap@codeaurora.org>
Trishansh Bhardwaj [Tue, 4 Jul 2017 08:43:15 +0000 (14:13 +0530)]
msm: camera: Unlock rwlock before returning.
put_buf and buf_done are not unlocking rwlock in error case.
Change-Id: Ie10afa15f332cf7bd38be69ea8b99b163b125e66
Signed-off-by: Trishansh Bhardwaj <tbhardwa@codeaurora.org>
Fenglin Wu [Mon, 3 Jul 2017 04:44:59 +0000 (12:44 +0800)]
pwm: pwm-qpnp: Ignore changing period setting if it's not requested
It's not necessary to reprogram PWM period setting if only
changing PWM duty cycle.
Change-Id: I366e17a5e2f18c09ab0850d00ec08a35e0f1cb9f
Signed-off-by: Fenglin Wu <fenglinw@codeaurora.org>