Re: [PATCH] block: don't show io_timeout if driver has no timeout handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bart Van Assche <bvanassche@xxxxxxx> 于2019年4月2日周二 上午6:41写道:
>
> On Sun, 2019-03-31 at 23:28 +0800, weiping zhang wrote:
> > On Tue, Jan 08, 2019 at 04:57:40PM -0800, Bart Van Assche wrote:
> > > > @@ -942,6 +961,14 @@ int blk_register_queue(struct gendisk *disk)
> > > >           goto unlock;
> > > >   }
> > > >
> > > > + ret = sysfs_create_group(&q->kobj, &queue_attr_group);
> > > > + if (ret) {
> > > > +         kobject_del(&q->kobj);
> > > > +         blk_trace_remove_sysfs(dev);
> > > > +         kobject_put(&dev->kobj);
> > > > +         goto unlock;
> > > > + }
> > >
> > > Are you sure the "goto unlock" is OK here? Shouldn't kobject_del() be called
> > > to undo the kobject_add() call if sysfs_create_group() fails?
> >
> > Sorry, can you tell me why it's may be not safe, if goto unlock here,
> > if failed to call sysfs_create_group, I think we should call
> > kobject_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, I post v2 later.
> Thanks,
>
> Bart.




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux