lkml.org 
[lkml]   [2015]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 3.13.y-ckt 19/95] UBI: account for bitflips in both the VID header and data
    Date
    3.13.11-ckt21 -stable review patch.  If anyone has any objections, please let me know.

    ------------------

    From: Brian Norris <computersforpeace@gmail.com>

    commit 8eef7d70f7c6772c3490f410ee2bceab3b543fa1 upstream.

    We are completely discarding the earlier value of 'bitflips', which
    could reflect a bitflip found in ubi_io_read_vid_hdr(). Let's use the
    bitwise OR of header and data 'bitflip' statuses instead.

    Coverity CID #1226856

    Signed-off-by: Brian Norris <computersforpeace@gmail.com>
    Signed-off-by: Richard Weinberger <richard@nod.at>
    Signed-off-by: Kamal Mostafa <kamal@canonical.com>
    ---
    drivers/mtd/ubi/attach.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c
    index 33bb1f2..208d86b 100644
    --- a/drivers/mtd/ubi/attach.c
    +++ b/drivers/mtd/ubi/attach.c
    @@ -408,7 +408,7 @@ int ubi_compare_lebs(struct ubi_device *ubi, const struct ubi_ainf_peb *aeb,
    second_is_newer = !second_is_newer;
    } else {
    dbg_bld("PEB %d CRC is OK", pnum);
    - bitflips = !!err;
    + bitflips |= !!err;
    }
    mutex_unlock(&ubi->buf_mutex);

    --
    1.9.1


    \
     
     \ /
      Last update: 2015-05-27 21:41    [W:4.423 / U:0.136 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site