Re: [PATCH 10/12] Limit bio_endio recursion

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

 



On Thu, Apr 7, 2016 at 1:44 PM, Ming Lei <tom.leiming@xxxxxxxxx> wrote:
> On Thu, 7 Apr 2016 11:54:49 +0800
> Ming Lei <tom.leiming@xxxxxxxxx> wrote:
>

> @@ -1737,6 +1739,46 @@ static inline bool bio_remaining_done(struct bio *bio)
>         return false;
>  }
>
> +/* disable local irq when manipulating the percpu bio_list */
> +static void unwind_bio_endio(struct bio *bio)
> +{
> +       struct bio_list bl_in_stack;
> +       struct bio_list *bl;
> +       unsigned long flags;
> +       bool clear_list = false;
> +
> +       local_irq_save(flags);
> +
> +       bl = this_cpu_read(bio_end_list);
> +       if (!bl) {
> +               bl = &bl_in_stack;
> +               bio_list_init(bl);
> +               clear_list = true;

oops, forget to write the pointer into the percpu bio_list pointer.
But it is still working after I fix that by the following line:

             this_cpu_write(bio_end_list, bl);

thanks,
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux