diff options
author | Sage Weil <sage@newdream.net> | 2009-12-21 23:49:37 +0100 |
---|---|---|
committer | Sage Weil <sage@newdream.net> | 2009-12-22 01:39:59 +0100 |
commit | 30dc6381bbac213987be6fe0b0fb89868ff1f2c0 (patch) | |
tree | f647d1826a3f8cf07a510cad49c9f400359a9ae4 /fs/ceph/osd_client.c | |
parent | ceph: do not drop lease during revalidate (diff) | |
download | linux-30dc6381bbac213987be6fe0b0fb89868ff1f2c0.tar.xz linux-30dc6381bbac213987be6fe0b0fb89868ff1f2c0.zip |
ceph: fix error paths for corrupt osdmap messages
Both osdmap_decode() and osdmap_apply_incremental() should never return
NULL.
Signed-off-by: Sage Weil <sage@newdream.net>
Diffstat (limited to 'fs/ceph/osd_client.c')
-rw-r--r-- | fs/ceph/osd_client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ceph/osd_client.c b/fs/ceph/osd_client.c index 4bfe880d53c8..b474b3ad61f0 100644 --- a/fs/ceph/osd_client.c +++ b/fs/ceph/osd_client.c @@ -910,6 +910,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) err = PTR_ERR(newmap); goto bad; } + BUG_ON(!newmap); if (newmap != osdc->osdmap) { ceph_osdmap_destroy(osdc->osdmap); osdc->osdmap = newmap; @@ -946,6 +947,7 @@ void ceph_osdc_handle_map(struct ceph_osd_client *osdc, struct ceph_msg *msg) err = PTR_ERR(newmap); goto bad; } + BUG_ON(!newmap); oldmap = osdc->osdmap; osdc->osdmap = newmap; if (oldmap) |