Skip to contentSkip to conversation

Bug in drbd_adm_attach()

Drbd-dev Jan Kara 2 participants 2 messages Oct 21, 2014 – Oct 29, 2014 DRBD driver

lore
Share & tools
lore

Jan Kara

author
#0 lore raw

Hello,

Coverity has spotted a problem in drbd_adm_attach() which does:

        connection = peer_device ? peer_device->connection : NULL;
        conn_reconfig_start(connection);

and conn_reconfig_start() just blindly dereferences 'connection'. So either peer_device cannot be NULL (and then the test is superfluous) or there's a bug...

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR
maintainer
#1 lore raw

Am Dienstag, 21. Oktober 2014, 16:12:26 schrieb Jan Kara:

Quoted 4 lines

Hello,

Coverity has spotted a problem in drbd_adm_attach() which does:

Quoted 8 lines
        connection = peer_device ? peer_device->connection : NULL;
        conn_reconfig_start(connection);

and conn_reconfig_start() just blindly dereferences 'connection'. So either peer_device cannot be NULL (and then the test is superfluous) or there's a bug...

Honza

Thanks for pointing out.
http://git.drbd.org/gitweb.cgi?p=drbd-8.4.git;a=commitdiff;h=8d7d18b40dbe006a3ca25d560e42617a04c68e1f;hp=1564eb39534debeead593f597c5c951c588ecf8b

Best,
Phil