summaryrefslogtreecommitdiff
path: root/drivers/pinctrl/pinctrl-bm1880.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2023-01-04 22:06:28 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2023-01-07 01:09:13 +0300
commitcb7a95af78d29442b8294683eca4897544b8ef46 (patch)
tree0f936985ff3f5ae9b1916d562a1cc2507325b132 /drivers/pinctrl/pinctrl-bm1880.c
parenta689b938df39ab513026c53fb7011fd7cd594943 (diff)
downloadlinux-cb7a95af78d29442b8294683eca4897544b8ef46.tar.xz
hfs/hfsplus: avoid WARN_ON() for sanity check, use proper error handling
Commit 55d1cbbbb29e ("hfs/hfsplus: use WARN_ON for sanity check") fixed a build warning by turning a comment into a WARN_ON(), but it turns out that syzbot then complains because it can trigger said warning with a corrupted hfs image. The warning actually does warn about a bad situation, but we are much better off just handling it as the error it is. So rather than warn about us doing bad things, stop doing the bad things and return -EIO. While at it, also fix a memory leak that was introduced by an earlier fix for a similar syzbot warning situation, and add a check for one case that historically wasn't handled at all (ie neither comment nor subsequent WARN_ON). Reported-by: syzbot+7bb7cd3595533513a9e7@syzkaller.appspotmail.com Fixes: 55d1cbbbb29e ("hfs/hfsplus: use WARN_ON for sanity check") Fixes: 8d824e69d9f3 ("hfs: fix OOB Read in __hfs_brec_find") Link: https://lore.kernel.org/lkml/000000000000dbce4e05f170f289@google.com/ Tested-by: Michael Schmitz <schmitzmic@gmail.com> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Matthew Wilcox <willy@infradead.org> Cc: Viacheslav Dubeyko <slava@dubeyko.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/pinctrl/pinctrl-bm1880.c')
0 files changed, 0 insertions, 0 deletions