--- m/kernel/watch_queue.c +++ n/kernel/watch_queue.c @@ -218,6 +218,8 @@ void __post_watch_notification(struct wa n->info |= watch->info_id; wqueue = rcu_dereference(watch->queue); + if (!wqueue) + continue; wf = rcu_dereference(wqueue->filter); if (wf && !filter_watch_notification(wf, n)) continue; @@ -615,7 +617,8 @@ void watch_queue_clear(struct watch_queu rcu_assign_pointer(watch->watch_list, NULL); /* We now own a second ref on the watch. */ - } + } else + rcu_assign_pointer(watch->queue, NULL); release_watch = wlist->release_watch; spin_unlock(&wlist->lock);