From: bobijam Date: Mon, 15 Jun 2009 01:42:31 +0000 (+0000) Subject: Branch b1_8 X-Git-Tag: v1_8_2_01~1^2~321 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=8b73b94f366b96a9b71badca7b2e1947180f3d34;p=fs%2Flustre-release.git Branch b1_8 b=17213 i=andrew.perepechko (panda) i=johann avoid getting client uuid from invalid client_obd. --- 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)