remarkable-linux/fs/ubifs
Geert Uytterhoeven 2a71a742f0 ubifs: Fix uninitialized variable in search_dh_cookie()
[ Upstream commit c877154d30 ]

fs/ubifs/tnc.c: In function ‘search_dh_cookie’:
fs/ubifs/tnc.c:1893: warning: ‘err’ is used uninitialized in this function

Indeed, err is always used uninitialized.

According to an original review comment from Hyunchul, acknowledged by
Richard, err should be initialized to -ENOENT to avoid the first call to
tnc_next().  But we can achieve the same by reordering the code.

Fixes: 781f675e2d ("ubifs: Fix unlink code wrt. double hash lookups")
Reported-by: Hyunchul Lee <hyc.lee@gmail.com>
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-04-26 11:02:07 +02:00
..
budget.c
commit.c
compress.c
crypto.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
debug.c ubifs: Fix cut and paste error on sb type comparisons 2017-05-08 20:48:41 +02:00
debug.h
dir.c ubifs: free the encrypted symlink target 2018-02-16 20:22:57 +01:00
file.c mm/migrate: new migrate mode MIGRATE_SYNC_NO_COPY 2017-09-08 18:26:46 -07:00
find.c
gc.c
io.c
ioctl.c This pull request contains updates for both UBI and UBIFS: 2017-05-13 10:23:12 -07:00
journal.c ubifs: Set double hash cookie also for RENAME_EXCHANGE 2017-07-14 22:50:57 +02:00
Kconfig ubifs: Add CONFIG_UBIFS_FS_SECURITY to disable/enable security labels 2017-05-08 20:48:23 +02:00
key.h ubifs: Add assert to dent_key_init() 2017-07-14 22:49:06 +02:00
log.c
lprops.c
lpt.c
lpt_commit.c
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
master.c
misc.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
misc.h fs: ubifs: replace CURRENT_TIME_SEC with current_time 2017-05-08 17:15:15 -07:00
orphan.c
recovery.c ubifs: Remove unnecessary assignment 2017-05-08 20:48:47 +02:00
replay.c
sb.c fs: ubifs: replace CURRENT_TIME_SEC with current_time 2017-05-08 17:15:15 -07:00
scan.c
shrinker.c
super.c ubifs: Check ubifs_wbuf_sync() return code 2018-04-24 09:36:21 +02:00
tnc.c ubifs: Fix uninitialized variable in search_dh_cookie() 2018-04-26 11:02:07 +02:00
tnc_commit.c ubifs: Fail commit if TNC is obviously inconsistent 2017-07-14 22:49:07 +02:00
tnc_misc.c
ubifs-media.h
ubifs.h ubifs: Massage assert in ubifs_xattr_set() wrt. init_xattrs 2017-07-14 22:50:54 +02:00
xattr.c ubifs: Massage assert in ubifs_xattr_set() wrt. init_xattrs 2017-07-14 22:50:54 +02:00