[Drbd-dev] Bug(s) with Linux v5.4.46

Sarah Newman srn at prgmr.com
Fri Jul 31 08:27:03 CEST 2020


On 7/27/20 12:16 AM, Lars Ellenberg wrote:
> On Sun, Jul 26, 2020 at 08:55:10PM -0700, Sarah Newman wrote:
> 
>> 	kref_put(&device->kref, drbd_destroy_device);
> 
> At this point we are "sure" to still hold at least one
> additional reference on device.
> 
>> 	del_gendisk(device->vdisk);
>> 	synchronize_rcu();
> 
> which we put here:
> 
>> 	kref_put(&device->kref, drbd_destroy_device);
> 
> 
> But what you present here shows that in your case that is not true.
> 

Is there a missing kref_get (and put on failure) around calling

"queue_work(connection->ack_sender, &peer_req->peer_device->send_acks_work);"

from handle_write_conflicts ?

I don't understand at all how drbd_adm_get_initial_state is supposed to work... for that reason, that's the only other place I potentially see an 
issue via code inspection.

Thanks, Sarah


More information about the drbd-dev mailing list