ceph: avoid possible null dereference
authorSage Weil <sage@newdream.net>
Tue, 25 May 2010 16:24:42 +0000 (09:24 -0700)
committerSage Weil <sage@newdream.net>
Sat, 29 May 2010 16:12:36 +0000 (09:12 -0700)
ac->ops may be null; use protocol id in error message instead.

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/auth.c

index 9f46de2ba7a7d58214fc63d457b0087108632c43..01c4a1cd53c0c4489677b0263de278c9fa94b7c8 100644 (file)
@@ -217,8 +217,8 @@ int ceph_handle_auth_reply(struct ceph_auth_client *ac,
                if (ac->protocol != protocol) {
                        ret = ceph_auth_init_protocol(ac, protocol);
                        if (ret) {
-                               pr_err("error %d on auth method %s init\n",
-                                      ret, ac->ops->name);
+                               pr_err("error %d on auth protocol %d init\n",
+                                      ret, protocol);
                                goto out;
                        }
                }