lkml.org 
[lkml]   [2014]   [Nov]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] UBI: Fix invalid vfree()
From
Date
On Mon, 2014-10-27 at 00:46 +0100, Richard Weinberger wrote:
> The logic of vfree()'ing vol->upd_buf is tied to vol->updating.
> In ubi_start_update() vol->updating is set long before vmalloc()'ing
> vol->upd_buf. If we encounter a write failure in ubi_start_update()
> before vmalloc() the UBI device release function will try to vfree()
> vol->upd_buf because vol->updating is set.
> Fix this by allocating vol->upd_buf directly after setting vol->updating.

Pushed, thanks!



\
 
 \ /
  Last update: 2014-11-07 14:41    [W:0.026 / U:0.116 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site