On Sun, 2019-03-31 at 23:28 +-0800, weiping zhang wrote: +AD4 On Tue, Jan 08, 2019 at 04:57:40PM -0800, Bart Van Assche wrote: +AD4 +AD4 +AD4 +AEAAQA -942,6 +-961,14 +AEAAQA int blk+AF8-register+AF8-queue(struct gendisk +ACo-disk) +AD4 +AD4 +AD4 goto unlock+ADs +AD4 +AD4 +AD4 +AH0 +AD4 +AD4 +AD4 +AD4 +AD4 +AD4 +- ret +AD0 sysfs+AF8-create+AF8-group(+ACY-q-+AD4-kobj, +ACY-queue+AF8-attr+AF8-group)+ADs +AD4 +AD4 +AD4 +- if (ret) +AHs +AD4 +AD4 +AD4 +- kobject+AF8-del(+ACY-q-+AD4-kobj)+ADs +AD4 +AD4 +AD4 +- blk+AF8-trace+AF8-remove+AF8-sysfs(dev)+ADs +AD4 +AD4 +AD4 +- kobject+AF8-put(+ACY-dev-+AD4-kobj)+ADs +AD4 +AD4 +AD4 +- goto unlock+ADs +AD4 +AD4 +AD4 +- +AH0 +AD4 +AD4 +AD4 +AD4 Are you sure the +ACI-goto unlock+ACI is OK here? Shouldn't kobject+AF8-del() be called +AD4 +AD4 to undo the kobject+AF8-add() call if sysfs+AF8-create+AF8-group() fails? +AD4 +AD4 Sorry, can you tell me why it's may be not safe, if goto unlock here, +AD4 if failed to call sysfs+AF8-create+AF8-group, I think we should call +AD4 kobject+AF8-del. Can you address the other comments and repost your patch? I may have misread your patch when I wrote the above comment. Thanks, Bart.