]> Git Repo - linux.git/commitdiff
Merge tag 'upstream-4.5-rc7' of git://git.infradead.org/linux-ubifs
authorLinus Torvalds <[email protected]>
Sun, 6 Mar 2016 19:24:05 +0000 (11:24 -0800)
committerLinus Torvalds <[email protected]>
Sun, 6 Mar 2016 19:24:05 +0000 (11:24 -0800)
Pull UBI fix from Richard Weinberger:
 "This contains a single bug fix for UBI"

* tag 'upstream-4.5-rc7' of git://git.infradead.org/linux-ubifs:
  ubi: Fix out of bounds write in volume update code

drivers/mtd/ubi/upd.c

index 2a1b6e037e1a1ced496ac446ca07d6037ef61d0e..0134ba32a05784b65d1a0e6d470eee7a857df74c 100644 (file)
@@ -193,7 +193,7 @@ int ubi_start_leb_change(struct ubi_device *ubi, struct ubi_volume *vol,
        vol->changing_leb = 1;
        vol->ch_lnum = req->lnum;
 
-       vol->upd_buf = vmalloc(req->bytes);
+       vol->upd_buf = vmalloc(ALIGN((int)req->bytes, ubi->min_io_size));
        if (!vol->upd_buf)
                return -ENOMEM;
 
This page took 0.056341 seconds and 4 git commands to generate.