Dave Wysochanski <dwysocha@xxxxxxxxxx> wrote: > If a cookie expires from the LRU and the LRU_DISCARD flag is set, > but the state machine has not run yet, it's possible another thread > can call fscache_use_cookie and begin to use it. When the > cookie_worker finally runs, it will see the LRU_DISCARD flag set, > transition the cookie->state to LRU_DISCARDING, which will then > withdraw the cookie. Once the cookie is withdrawn the object is > removed the below oops will occur because the object associated > with the cookie is now NULL. > > Fix the oops by clearing the LRU_DISCARD bit if another thread > uses the cookie before the cookie_worker runs. I think this is the right approach. The state machine should just fall through without doing anything, despite having been woken. David