Merge 2d74366078 ("Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs") into android-mainline
Steps on the way to 5.12-rc7 Signed-off-by: Greg Kroah-Hartman <gregkh@google.com> Change-Id: Iebe1022530a6059e10ba470149654a5d6701f3be
This commit is contained in:
commit
cb0ffb7ffc
4 changed files with 17 additions and 20 deletions
|
|
@ -144,7 +144,7 @@ static char *follow_link(char *link)
|
|||
char *name, *resolved, *end;
|
||||
int n;
|
||||
|
||||
name = __getname();
|
||||
name = kmalloc(PATH_MAX, GFP_KERNEL);
|
||||
if (!name) {
|
||||
n = -ENOMEM;
|
||||
goto out_free;
|
||||
|
|
@ -173,12 +173,11 @@ static char *follow_link(char *link)
|
|||
goto out_free;
|
||||
}
|
||||
|
||||
__putname(name);
|
||||
kfree(link);
|
||||
kfree(name);
|
||||
return resolved;
|
||||
|
||||
out_free:
|
||||
__putname(name);
|
||||
kfree(name);
|
||||
return ERR_PTR(n);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -582,6 +582,8 @@ static void set_nameidata(struct nameidata *p, int dfd, struct filename *name)
|
|||
p->stack = p->internal;
|
||||
p->dfd = dfd;
|
||||
p->name = name;
|
||||
p->path.mnt = NULL;
|
||||
p->path.dentry = NULL;
|
||||
p->total_link_count = old ? old->total_link_count : 0;
|
||||
p->saved = old;
|
||||
current->nameidata = p;
|
||||
|
|
@ -655,6 +657,8 @@ static void terminate_walk(struct nameidata *nd)
|
|||
rcu_read_unlock();
|
||||
}
|
||||
nd->depth = 0;
|
||||
nd->path.mnt = NULL;
|
||||
nd->path.dentry = NULL;
|
||||
}
|
||||
|
||||
/* path_put is needed afterwards regardless of success or failure */
|
||||
|
|
@ -2406,8 +2410,6 @@ static const char *path_init(struct nameidata *nd, unsigned flags)
|
|||
}
|
||||
|
||||
nd->root.mnt = NULL;
|
||||
nd->path.mnt = NULL;
|
||||
nd->path.dentry = NULL;
|
||||
|
||||
/* Absolute pathname -- fetch the root (LOOKUP_IN_ROOT uses nd->dfd). */
|
||||
if (*s == '/' && !(flags & LOOKUP_IN_ROOT)) {
|
||||
|
|
|
|||
|
|
@ -278,9 +278,10 @@ void touch_all_softlockup_watchdogs(void)
|
|||
* update as well, the only side effect might be a cycle delay for
|
||||
* the softlockup check.
|
||||
*/
|
||||
for_each_cpu(cpu, &watchdog_allowed_mask)
|
||||
for_each_cpu(cpu, &watchdog_allowed_mask) {
|
||||
per_cpu(watchdog_touch_ts, cpu) = SOFTLOCKUP_RESET;
|
||||
wq_watchdog_touch(-1);
|
||||
wq_watchdog_touch(cpu);
|
||||
}
|
||||
}
|
||||
|
||||
void touch_softlockup_watchdog_sync(void)
|
||||
|
|
|
|||
|
|
@ -1416,7 +1416,6 @@ static void __queue_work(int cpu, struct workqueue_struct *wq,
|
|||
*/
|
||||
lockdep_assert_irqs_disabled();
|
||||
|
||||
debug_work_activate(work);
|
||||
|
||||
/* if draining, only works from the same workqueue are allowed */
|
||||
if (unlikely(wq->flags & __WQ_DRAINING) &&
|
||||
|
|
@ -1498,6 +1497,7 @@ retry:
|
|||
worklist = &pwq->delayed_works;
|
||||
}
|
||||
|
||||
debug_work_activate(work);
|
||||
insert_work(pwq, work, worklist, work_flags);
|
||||
|
||||
out:
|
||||
|
|
@ -5791,22 +5791,17 @@ static void wq_watchdog_timer_fn(struct timer_list *unused)
|
|||
continue;
|
||||
|
||||
/* get the latest of pool and touched timestamps */
|
||||
if (pool->cpu >= 0)
|
||||
touched = READ_ONCE(per_cpu(wq_watchdog_touched_cpu, pool->cpu));
|
||||
else
|
||||
touched = READ_ONCE(wq_watchdog_touched);
|
||||
pool_ts = READ_ONCE(pool->watchdog_ts);
|
||||
touched = READ_ONCE(wq_watchdog_touched);
|
||||
|
||||
if (time_after(pool_ts, touched))
|
||||
ts = pool_ts;
|
||||
else
|
||||
ts = touched;
|
||||
|
||||
if (pool->cpu >= 0) {
|
||||
unsigned long cpu_touched =
|
||||
READ_ONCE(per_cpu(wq_watchdog_touched_cpu,
|
||||
pool->cpu));
|
||||
if (time_after(cpu_touched, ts))
|
||||
ts = cpu_touched;
|
||||
}
|
||||
|
||||
/* did we stall? */
|
||||
if (time_after(jiffies, ts + thresh)) {
|
||||
lockup_detected = true;
|
||||
|
|
@ -5831,8 +5826,8 @@ notrace void wq_watchdog_touch(int cpu)
|
|||
{
|
||||
if (cpu >= 0)
|
||||
per_cpu(wq_watchdog_touched_cpu, cpu) = jiffies;
|
||||
else
|
||||
wq_watchdog_touched = jiffies;
|
||||
|
||||
wq_watchdog_touched = jiffies;
|
||||
}
|
||||
|
||||
static void wq_watchdog_set_thresh(unsigned long thresh)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue