]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
powerpc/nvram: Fix an incorrect partition merge
authorPan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Thu, 10 Dec 2015 07:30:02 +0000 (15:30 +0800)
committerJiri Slaby <jslaby@suse.cz>
Tue, 8 Nov 2016 15:38:29 +0000 (16:38 +0100)
commitd4f4a8c3632d2572e3e76ab79c44a0fc50184b0c
tree1a88e87e5289f314e03eefbecbbc1490894a36b1
parent8748ad71f1f38f57468e3f77b5e614214bed79c2
powerpc/nvram: Fix an incorrect partition merge

commit 11b7e154b132232535befe51c55db048069c8461 upstream.

When we merge two contiguous partitions whose signatures are marked
NVRAM_SIG_FREE, We need update prev's length and checksum, then write it
to nvram, not cur's. So lets fix this mistake now.

Also use memset instead of strncpy to set the partition's name. It's
more readable if we want to fill up with duplicate chars .

Fixes: fa2b4e54d41f ("powerpc/nvram: Improve partition removal")
Signed-off-by: Pan Xinhui <xinhui.pan@linux.vnet.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
arch/powerpc/kernel/nvram_64.c