> dinghao.liu@ wrote:
> > > Ira Weiny wrote:
> > > > Dinghao Liu wrote:
[snip]
> > > >
> > > > This does not quite work.
> > > >
> > > > free_arenas() is used in the error paths of create_arenas() and
> > > > discover_arenas(). In those cases devm_kfree() is probably a better way
> > > > to
dinghao.liu@ wrote:
> > Ira Weiny wrote:
> > > Dinghao Liu wrote:
> >
> > [snip]
> >
> > -static int btt_freelist_init(struct arena_info *arena)
> > +static int btt_freelist_init(struct device *dev, struct arena_info *arena)
> >
> > Both struct arena_info and struct btt contain references to
> Ira Weiny wrote:
> > Dinghao Liu wrote:
>
> [snip]
>
> -static int btt_freelist_init(struct arena_info *arena)
> +static int btt_freelist_init(struct device *dev, struct arena_info *arena)
>
> Both struct arena_info and struct btt contain references to struct nd_btt
> which is the device you
Ira Weiny wrote:
> Dinghao Liu wrote:
[snip]
> >
> > -static int btt_maplocks_init(struct arena_info *arena)
> > +static int btt_maplocks_init(struct device *dev, struct arena_info *arena)
> > {
> > u32 i;
> >
> > - arena->map_locks = kcalloc(arena->nfree, sizeof(struct aligned_lock),
Dinghao Liu wrote:
> Resources allocated by kcalloc() in btt_freelist_init(),
> btt_rtt_init(), and btt_maplocks_init() are not correctly
> released in their callers when an error happens. For
> example, when an error happens in btt_freelist_init(), its
> caller discover_arenas() will directly
Resources allocated by kcalloc() in btt_freelist_init(),
btt_rtt_init(), and btt_maplocks_init() are not correctly
released in their callers when an error happens. For
example, when an error happens in btt_freelist_init(), its
caller discover_arenas() will directly free arena, which makes
6 matches
Mail list logo