Re: [RFC] hard LOCKUP caused by race between blk_init_queue_node and blkcg_print_blkgs

Bart Van Assche
2018-01-30T21:19:30Z

T24gVHVlLCAyMDE4LTAxLTMwIGF0IDE5OjIxICswODAwLCBKb3NlcGggUWkgd3JvdGU6DQo+IEhp
IEplbnMgYW5kIEZvbGtzLA0KPiANCj4gUmVjZW50bHkgd2UndmUgZ290dGVuIGEgaGFyZCBMT0NL
VVAgaXNzdWUuIEFmdGVyIGludmVzdGlnYXRpbmcgdGhlIGlzc3VlDQo+IHdlJ3ZlIGZvdW5kIGEg
cmFjZSBiZXR3ZWVuIGJsa19pbml0X3F1ZXVlX25vZGUgYW5kIGJsa2NnX3ByaW50X2Jsa2dzLg0K
PiBUaGUgcmFjZSBpcyBkZXNjcmliZWQgYmVsb3cuDQo+IA0KPiBibGtfaW5pdF9xdWV1ZV9ub2Rl
ICAgICAgICAgICAgICAgICBibGtjZ19wcmludF9ibGtncw0KPiAgIGJsa19hbGxvY19xdWV1ZV9u
b2RlICgxKQ0KPiAgICAgcS0+cXVldWVfbG9jayA9ICZxLT5fX3F1ZXVlX2xvY2sgKDIpDQo+ICAg
ICBibGtjZ19pbml0X3F1ZXVlKHEpICgzKQ0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICAgICAgICBzcGluX2xvY2tfaXJxKGJsa2ctPnEtPnF1ZXVlX2xvY2spICg0KQ0KPiAgIHEtPnF1
ZXVlX2xvY2sgPSBsb2NrICg1KQ0KPiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAg
ICBzcGluX3VubG9ja19pcnEoYmxrZy0+cS0+cXVldWVfbG9jaykgKDYpDQo+IA0KPiAoMSkgYWxs
b2NhdGUgYW4gdW5pbml0aWFsaXplZCBxdWV1ZTsNCj4gKDIpIGluaXRpYWxpemUgcXVldWVfbG9j
ayB0byBpdHMgZGVmYXVsdCBpbnRlcm5hbCBsb2NrOw0KPiAoMykgaW5pdGlhbGl6ZSBibGtjZyBw
YXJ0IG9mIHJl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