summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2017-08-24 11:28:38 (GMT)
committerAlex Shi <alex.shi@linaro.org>2017-08-24 11:28:38 (GMT)
commit7c6819fafcd4d26f655ad9b0441f79773c69cf99 (patch)
treef1345c2c196f58257d1f338b9f2752f470c44923 /mm
parent5d296e2cec6ebbb062829078ffcd36a205c9b293 (diff)
parenta97a16f18c4895e41951a44d27af8af0b8f1d897 (diff)
downloadlinux-7c6819fafcd4d26f655ad9b0441f79773c69cf99.tar.xz
Merge tag 'v4.9.44' into linux-linaro-lsk-v4.9
This is the 4.9.44 stable release
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c2
-rw-r--r--mm/shmem.c12
2 files changed, 11 insertions, 3 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 77b797c..9419aa4 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -7335,7 +7335,7 @@ int alloc_contig_range(unsigned long start, unsigned long end,
/* Make sure the range is really isolated. */
if (test_pages_isolated(outer_start, end, false)) {
- pr_info("%s: [%lx, %lx) PFNs busy\n",
+ pr_info_ratelimited("%s: [%lx, %lx) PFNs busy\n",
__func__, outer_start, end);
ret = -EBUSY;
goto done;
diff --git a/mm/shmem.c b/mm/shmem.c
index d99cfb6..7ee5444 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -1007,7 +1007,11 @@ static int shmem_setattr(struct dentry *dentry, struct iattr *attr)
*/
if (IS_ENABLED(CONFIG_TRANSPARENT_HUGE_PAGECACHE)) {
spin_lock(&sbinfo->shrinklist_lock);
- if (list_empty(&info->shrinklist)) {
+ /*
+ * _careful to defend against unlocked access to
+ * ->shrink_list in shmem_unused_huge_shrink()
+ */
+ if (list_empty_careful(&info->shrinklist)) {
list_add_tail(&info->shrinklist,
&sbinfo->shrinklist);
sbinfo->shrinklist_len++;
@@ -1774,7 +1778,11 @@ alloc_nohuge: page = shmem_alloc_and_acct_page(gfp, info, sbinfo,
* to shrink under memory pressure.
*/
spin_lock(&sbinfo->shrinklist_lock);
- if (list_empty(&info->shrinklist)) {
+ /*
+ * _careful to defend against unlocked access to
+ * ->shrink_list in shmem_unused_huge_shrink()
+ */
+ if (list_empty_careful(&info->shrinklist)) {
list_add_tail(&info->shrinklist,
&sbinfo->shrinklist);
sbinfo->shrinklist_len++;