From 8b73b94f366b96a9b71badca7b2e1947180f3d34 Mon Sep 17 00:00:00 2001 From: bobijam Date: Mon, 15 Jun 2009 01:42:31 +0000 Subject: [PATCH] Branch b1_8 b=17213 i=andrew.perepechko (panda) i=johann avoid getting client uuid from invalid client_obd. --- lustre/llite/llite_lib.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 475f599..f12d150 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -2429,9 +2429,14 @@ int ll_obd_statfs(struct inode *inode, void *arg) GOTO(out_statfs, rc = -EFAULT); out_uuid: - if (copy_to_user(data->ioc_pbuf2, obd2cli_tgt(client_obd), - data->ioc_plen2)) - rc = -EFAULT; + if (client_obd) { + if (copy_to_user(data->ioc_pbuf2, obd2cli_tgt(client_obd), + data->ioc_plen2)) + rc = -EFAULT; + } else { + if (copy_to_user(data->ioc_pbuf2, "Unknown UUID", 13)) + rc = -EFAULT; + } out_statfs: if (buf) -- 1.8.3.1