linux/drivers/staging/lustre
Christopher J. Morrone 717d1c2ee3 staging/lustre/llite: Avoid statahead thread start/stop deadlocks
The statahead and statahead agl threads blindly set their
thread state to SVC_RUNNING without checking the state first.  If, for
instance, another thread sets the state to SVC_STOPPING that
stop signal will now have been lost.  Deadlock ensues.

We also partly improve the sai reference counting, because a race exists
where the ll_stop_statahead thread can drop the default reference, and
the statahead thread can exit and drop its reference as well.  With no
references on the sai, the final put will poison and free the buffer.  The
original do_statahead_enter() function may then continue to access
the buffer after it is freed because it did not take a reference of its
own.  We add a local reference to address that.

Signed-off-by: Christopher J. Morrone <morrone2@llnl.gov>
Reviewed-on: http://review.whamcloud.com/9358
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4624
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-27 10:24:54 -07:00
..
include/linux staging/lustre: restore __GFP_WAIT flag to memalloc calls 2014-04-27 10:23:15 -07:00
lnet staging/lustre: restore __GFP_WAIT flag to memalloc calls 2014-04-27 10:23:15 -07:00
lustre staging/lustre/llite: Avoid statahead thread start/stop deadlocks 2014-04-27 10:24:54 -07:00
Kconfig
Makefile staging/lustre: fix Lustre code link order 2013-07-23 12:23:55 -07:00
TODO lustre: add myself to list of people to CC on lustre patches 2014-02-07 09:09:38 -08:00