lkml.org 
[lkml]   [2020]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v4 00/12] pstore: mtd: support crash log to block and mtd device
On Sat, May 09, 2020 at 06:32:28PM +0800, WeiXiong Liao wrote:
> The following diff is to fix "rmmod" bug.
>
> @@ -1273,8 +1273,8 @@ static void psz_free_zones(struct pstore_zone
> ***pszones, unsigned int *cnt)
> return;
>
> while (*cnt > 0) {
> - psz_free_zone(&zones[*cnt]);
> (*cnt)--;
> + psz_free_zone(&zones[*cnt]);
> }
> kfree(zones);
> *pszones = NULL;

Ah-ha! Thanks; I'd almost found that. I got confused because I wasn't
see NULL free()s, and I finally noticed that the zones had left over
ERR_PTRs:

if (IS_ERR(cxt->fpszs)) {
err = PTR_ERR(cxt->fpszs);
+ cxt->fpszs = NULL;
goto free_out;
}

I'll fix those and your v5 and my lastest tree merged.

--
Kees Cook

\
 
 \ /
  Last update: 2020-05-09 21:11    [W:0.044 / U:0.072 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site