staging/lustre/ptlrpc: Fix assertion failure of null_alloc_rs()
authorPatrick Farrell <paf@cray.com>
Sun, 27 Apr 2014 17:06:25 +0000 (13:06 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 27 Apr 2014 17:21:37 +0000 (10:21 -0700)
commita34041af9e2167e56035a801c384687fcb05a577
tree1916124188fb49d1e4b9da87c62047944f9e5b65
parent2d5eafc179403b30af1d30bea932aebf375fb513
staging/lustre/ptlrpc: Fix assertion failure of null_alloc_rs()

lustre_get_emerg_rs() set the size of the reply buffer to zero
by mistake, which will cause LBUG in null_alloc_rs() when memory
pressure is high. This patch fix this problem and adds a size
check to avoid the problem of insufficient buffer size.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Patrick Farrell <paf@cray.com>
Reviewed-on: http://review.whamcloud.com/8200
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-3680
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Signed-off-by: Oleg Drokin <oleg.drokin@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ptlrpc/pack_generic.c
drivers/staging/lustre/lustre/ptlrpc/sec.c