Project

General

Profile

Actions

Cleanup #2438

closed

ceph-client: use BUG_ON() for null auth_client->ops pointers

Added by Alex Elder almost 12 years ago. Updated almost 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
% Done:

0%

Tags:
Backport:
Reviewed:
Affected Versions:

Description

I added code to in the client messenger to verify auth_client->ops
and auth_client->ops->(method) were non-null before blindly
dereferencing these pointers. In review, Sage suggested that some
of these could be BUG_ON() instead.

It would be preferable to further constrain things so that is possible,
but at the moment I don't have complete enough knowledge to make that
switch with confidence it's correct.

So at some point, I'd like to do this. And if in certain cases BUG_ON()
is inappropriate then other validity checks might be used.

Actions #1

Updated by Alex Elder almost 12 years ago

Touching all my bugs today. This one's a good idea but
very low priority.

Actions #2

Updated by Alex Elder almost 11 years ago

  • Status changed from New to Closed

Sage added this commit:
27859f9 libceph: wrap auth ops in wrapper functions
...which neatened up the auth calls.

The BUG_ON() suggestion is really just to validate some
constraints, but they're not critical to functionality.

So I'm just going to close this.

Actions

Also available in: Atom PDF