Re: [PATCH 3/3] staging: android: lowmemorykiller: Droptasklist_lock usage

From: Oleg Nesterov
Date: Mon Jan 30 2012 - 08:52:22 EST


On 01/30, Anton Vorontsov wrote:
>
> @@ -132,8 +134,8 @@ static int lowmem_shrink(struct shrinker *s, struct shrink_control *sc)
> }
> selected_oom_adj = min_adj;
>
> - read_lock(&tasklist_lock);
> - for_each_process(p) {
> + for_each_tgid(ns, iter) {

This makes force_sig() below unsafe, it can race with the exiting task.

Oleg.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/