]> Git Repo - linux.git/commit
ceph: ensure auth ops are defined before use
authorAlex Elder <[email protected]>
Wed, 16 May 2012 20:16:39 +0000 (15:16 -0500)
committerAlex Elder <[email protected]>
Thu, 17 May 2012 13:18:13 +0000 (08:18 -0500)
commita255651d4cad89f1a606edd36135af892ada4f20
tree6d2c694b336f948272349e5de24be70460a94826
parent74f1869f76d043bad12ec03b4d5f04a8c3d1f157
ceph: ensure auth ops are defined before use

In the create_authorizer method for both the mds and osd clients,
the auth_client->ops pointer is blindly dereferenced.  There is no
obvious guarantee that this pointer has been assigned.  And
furthermore, even if the ops pointer is non-null there is definitely
no guarantee that the create_authorizer or destroy_authorizer
methods are defined.

Add checks in both routines to make sure they are defined (non-null)
before use.  Add similar checks in a few other spots in these files
while we're at it.

Signed-off-by: Alex Elder <[email protected]>
Reviewed-by: Sage Weil <[email protected]>
fs/ceph/mds_client.c
net/ceph/osd_client.c
This page took 0.05319 seconds and 4 git commands to generate.