aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-18 18:56:25 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-18 18:56:25 -0400
commit73f1f5dd3ee3ec6e20768d831d9759b0330fad0e (patch)
tree22f8498c47467f468dce6c3bca0eb1f3a0c9ade0
parent30a08bf2d31d275c6fc71dd1811342777e95c831 (diff)
parent93c2d656c7120e29de8df5bc17bb2a97664104e9 (diff)
Merge branch 'akpm' (Andrew's patch-bomb)
Merge misc fixes from Andrew Morton. * emailed from Andrew Morton <akpm@linux-foundation.org>: (4 patches) frv: delete incorrect task prototypes causing compile fail slub: missing test for partial pages flush work in flush_all() fs, proc: fix ABBA deadlock in case of execution attempt of map_files/ entries drivers/rtc/rtc-pl031.c: configure correct wday for 2000-01-01
-rw-r--r--arch/frv/include/asm/processor.h4
-rw-r--r--drivers/rtc/rtc-pl031.c18
-rw-r--r--fs/proc/base.c20
-rw-r--r--mm/slub.c2
4 files changed, 27 insertions, 17 deletions
diff --git a/arch/frv/include/asm/processor.h b/arch/frv/include/asm/processor.h
index 81c2e271d620..9b1a92b73f60 100644
--- a/arch/frv/include/asm/processor.h
+++ b/arch/frv/include/asm/processor.h
@@ -135,10 +135,6 @@ unsigned long get_wchan(struct task_struct *p);
135#define KSTK_EIP(tsk) ((tsk)->thread.frame0->pc) 135#define KSTK_EIP(tsk) ((tsk)->thread.frame0->pc)
136#define KSTK_ESP(tsk) ((tsk)->thread.frame0->sp) 136#define KSTK_ESP(tsk) ((tsk)->thread.frame0->sp)
137 137
138/* Allocation and freeing of basic task resources. */
139extern struct task_struct *alloc_task_struct_node(int node);
140extern void free_task_struct(struct task_struct *p);
141
142#define cpu_relax() barrier() 138#define cpu_relax() barrier()
143 139
144/* data cache prefetch */ 140/* data cache prefetch */
diff --git a/drivers/rtc/rtc-pl031.c b/drivers/rtc/rtc-pl031.c
index 684ef4bbfce4..f027c063fb20 100644
--- a/drivers/rtc/rtc-pl031.c
+++ b/drivers/rtc/rtc-pl031.c
@@ -312,6 +312,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
312 int ret; 312 int ret;
313 struct pl031_local *ldata; 313 struct pl031_local *ldata;
314 struct rtc_class_ops *ops = id->data; 314 struct rtc_class_ops *ops = id->data;
315 unsigned long time;
315 316
316 ret = amba_request_regions(adev, NULL); 317 ret = amba_request_regions(adev, NULL);
317 if (ret) 318 if (ret)
@@ -343,6 +344,23 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
343 writel(readl(ldata->base + RTC_CR) | RTC_CR_CWEN, 344 writel(readl(ldata->base + RTC_CR) | RTC_CR_CWEN,
344 ldata->base + RTC_CR); 345 ldata->base + RTC_CR);
345 346
347 /*
348 * On ST PL031 variants, the RTC reset value does not provide correct
349 * weekday for 2000-01-01. Correct the erroneous sunday to saturday.
350 */
351 if (ldata->hw_designer == AMBA_VENDOR_ST) {
352 if (readl(ldata->base + RTC_YDR) == 0x2000) {
353 time = readl(ldata->base + RTC_DR);
354 if ((time &
355 (RTC_MON_MASK | RTC_MDAY_MASK | RTC_WDAY_MASK))
356 == 0x02120000) {
357 time = time | (0x7 << RTC_WDAY_SHIFT);
358 writel(0x2000, ldata->base + RTC_YLR);
359 writel(time, ldata->base + RTC_LR);
360 }
361 }
362 }
363
346 ldata->rtc = rtc_device_register("pl031", &adev->dev, ops, 364 ldata->rtc = rtc_device_register("pl031", &adev->dev, ops,
347 THIS_MODULE); 365 THIS_MODULE);
348 if (IS_ERR(ldata->rtc)) { 366 if (IS_ERR(ldata->rtc)) {
diff --git a/fs/proc/base.c b/fs/proc/base.c
index 7d6ad98631f2..57b8159f26f3 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -2162,16 +2162,16 @@ static struct dentry *proc_map_files_lookup(struct inode *dir,
2162 goto out; 2162 goto out;
2163 2163
2164 result = ERR_PTR(-EACCES); 2164 result = ERR_PTR(-EACCES);
2165 if (lock_trace(task)) 2165 if (!ptrace_may_access(task, PTRACE_MODE_READ))
2166 goto out_put_task; 2166 goto out_put_task;
2167 2167
2168 result = ERR_PTR(-ENOENT); 2168 result = ERR_PTR(-ENOENT);
2169 if (dname_to_vma_addr(dentry, &vm_start, &vm_end)) 2169 if (dname_to_vma_addr(dentry, &vm_start, &vm_end))
2170 goto out_unlock; 2170 goto out_put_task;
2171 2171
2172 mm = get_task_mm(task); 2172 mm = get_task_mm(task);
2173 if (!mm) 2173 if (!mm)
2174 goto out_unlock; 2174 goto out_put_task;
2175 2175
2176 down_read(&mm->mmap_sem); 2176 down_read(&mm->mmap_sem);
2177 vma = find_exact_vma(mm, vm_start, vm_end); 2177 vma = find_exact_vma(mm, vm_start, vm_end);
@@ -2183,8 +2183,6 @@ static struct dentry *proc_map_files_lookup(struct inode *dir,
2183out_no_vma: 2183out_no_vma:
2184 up_read(&mm->mmap_sem); 2184 up_read(&mm->mmap_sem);
2185 mmput(mm); 2185 mmput(mm);
2186out_unlock:
2187 unlock_trace(task);
2188out_put_task: 2186out_put_task:
2189 put_task_struct(task); 2187 put_task_struct(task);
2190out: 2188out:
@@ -2218,7 +2216,7 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
2218 goto out; 2216 goto out;
2219 2217
2220 ret = -EACCES; 2218 ret = -EACCES;
2221 if (lock_trace(task)) 2219 if (!ptrace_may_access(task, PTRACE_MODE_READ))
2222 goto out_put_task; 2220 goto out_put_task;
2223 2221
2224 ret = 0; 2222 ret = 0;
@@ -2226,12 +2224,12 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
2226 case 0: 2224 case 0:
2227 ino = inode->i_ino; 2225 ino = inode->i_ino;
2228 if (filldir(dirent, ".", 1, 0, ino, DT_DIR) < 0) 2226 if (filldir(dirent, ".", 1, 0, ino, DT_DIR) < 0)
2229 goto out_unlock; 2227 goto out_put_task;
2230 filp->f_pos++; 2228 filp->f_pos++;
2231 case 1: 2229 case 1:
2232 ino = parent_ino(dentry); 2230 ino = parent_ino(dentry);
2233 if (filldir(dirent, "..", 2, 1, ino, DT_DIR) < 0) 2231 if (filldir(dirent, "..", 2, 1, ino, DT_DIR) < 0)
2234 goto out_unlock; 2232 goto out_put_task;
2235 filp->f_pos++; 2233 filp->f_pos++;
2236 default: 2234 default:
2237 { 2235 {
@@ -2242,7 +2240,7 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
2242 2240
2243 mm = get_task_mm(task); 2241 mm = get_task_mm(task);
2244 if (!mm) 2242 if (!mm)
2245 goto out_unlock; 2243 goto out_put_task;
2246 down_read(&mm->mmap_sem); 2244 down_read(&mm->mmap_sem);
2247 2245
2248 nr_files = 0; 2246 nr_files = 0;
@@ -2272,7 +2270,7 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
2272 flex_array_free(fa); 2270 flex_array_free(fa);
2273 up_read(&mm->mmap_sem); 2271 up_read(&mm->mmap_sem);
2274 mmput(mm); 2272 mmput(mm);
2275 goto out_unlock; 2273 goto out_put_task;
2276 } 2274 }
2277 for (i = 0, vma = mm->mmap, pos = 2; vma; 2275 for (i = 0, vma = mm->mmap, pos = 2; vma;
2278 vma = vma->vm_next) { 2276 vma = vma->vm_next) {
@@ -2317,8 +2315,6 @@ proc_map_files_readdir(struct file *filp, void *dirent, filldir_t filldir)
2317 } 2315 }
2318 } 2316 }
2319 2317
2320out_unlock:
2321 unlock_trace(task);
2322out_put_task: 2318out_put_task:
2323 put_task_struct(task); 2319 put_task_struct(task);
2324out: 2320out:
diff --git a/mm/slub.c b/mm/slub.c
index ffe13fdf8144..80848cd3901c 100644
--- a/mm/slub.c
+++ b/mm/slub.c
@@ -2040,7 +2040,7 @@ static bool has_cpu_slab(int cpu, void *info)
2040 struct kmem_cache *s = info; 2040 struct kmem_cache *s = info;
2041 struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu); 2041 struct kmem_cache_cpu *c = per_cpu_ptr(s->cpu_slab, cpu);
2042 2042
2043 return !!(c->page); 2043 return c->page || c->partial;
2044} 2044}
2045 2045
2046static void flush_all(struct kmem_cache *s) 2046static void flush_all(struct kmem_cache *s)