diff options
author | Amit Pundir <amit.pundir@linaro.org> | 2015-08-25 11:31:07 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2015-08-25 11:31:07 +0530 |
commit | 8c75844086695909bc392d94d0829b6a04988219 (patch) | |
tree | 3fc07b9329d95f74aaeb7abc3cc0bcab7796db85 | |
parent | 69a3c4b5beadf9f9a4d68f5bcb3f10901c0b6ebc (diff) | |
parent | 556724fa019ddfd41ee73d9d5e7abfe91f2c5ed6 (diff) |
Merge branch 'android-3.18' of https://android.googlesource.com/kernel/commontracking-linaro-android-llct-llct-20150831.0tracking-linaro-android-llct-llct-20150826.0
* android-3.18:
Fix for in kernel emergency remount when loop mounts are used
pstore: pmsg: return -ENOMEM on vmalloc failure
-rw-r--r-- | fs/pstore/pmsg.c | 2 | ||||
-rw-r--r-- | fs/super.c | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/fs/pstore/pmsg.c b/fs/pstore/pmsg.c index feb5dd2948b4..5a2f05a16c1e 100644 --- a/fs/pstore/pmsg.c +++ b/fs/pstore/pmsg.c @@ -37,6 +37,8 @@ static ssize_t write_pmsg(struct file *file, const char __user *buf, if (buffer_size > PMSG_MAX_BOUNCE_BUFFER_SIZE) buffer_size = PMSG_MAX_BOUNCE_BUFFER_SIZE; buffer = vmalloc(buffer_size); + if (!buffer) + return -ENOMEM; mutex_lock(&pmsg_lock); for (i = 0; i < count; ) { diff --git a/fs/super.c b/fs/super.c index b61372354f2b..92fa0b717651 100644 --- a/fs/super.c +++ b/fs/super.c @@ -774,7 +774,7 @@ static void do_emergency_remount(struct work_struct *work) struct super_block *sb, *p = NULL; spin_lock(&sb_lock); - list_for_each_entry(sb, &super_blocks, s_list) { + list_for_each_entry_reverse(sb, &super_blocks, s_list) { if (hlist_unhashed(&sb->s_instances)) continue; sb->s_count++; |