From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@01.org, Gabriel Krisman Bertazi <krisman@collabora.co.uk>
Cc: kbuild-all@01.org, linux-ext4@vger.kernel.org,
"Theodore Ts'o" <tytso@mit.edu>
Subject: [ext4:unicode 8/10] fs/ext4/hash.c:286 ext4fs_dirhash() warn: returning -1 instead of -ENOMEM is sloppy
Date: Mon, 8 Apr 2019 09:34:43 +0300 [thread overview]
Message-ID: <20190408063443.GE6070@kadam> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git unicode
head: c0ae3a05c89c497446d6e208b68623993b5afc3c
commit: 6ca9bcdef8a4bc83fe8499ab47e29b849ea94bfb [8/10] ext4: support encoding-aware file name lookups
smatch warnings:
fs/ext4/hash.c:286 ext4fs_dirhash() warn: returning -1 instead of -ENOMEM is sloppy
# https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git/commit/?id=6ca9bcdef8a4bc83fe8499ab47e29b849ea94bfb
git remote add ext4 https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git
git remote update ext4
git checkout 6ca9bcdef8a4bc83fe8499ab47e29b849ea94bfb
vim +286 fs/ext4/hash.c
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 273
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 274 int ext4fs_dirhash(const struct inode *dir, const char *name, int len,
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 275 struct dx_hash_info *hinfo)
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 276 {
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 277 #ifdef CONFIG_UNICODE
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 278 const struct unicode_map *um = EXT4_SB(dir->i_sb)->s_encoding;
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 279 int r, dlen;
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 280 unsigned char *buff;
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 281 struct qstr qstr = {.name = name, .len = len };
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 282
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 283 if (len && um) {
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 284 buff = kzalloc(sizeof(char) * PATH_MAX, GFP_KERNEL);
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 285 if (!buff)
6ca9bcdef Gabriel Krisman Bertazi 2019-03-18 @286 return -1;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
reply other threads:[~2019-04-08 6:35 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190408063443.GE6070@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild-all@01.org \
--cc=kbuild@01.org \
--cc=krisman@collabora.co.uk \
--cc=linux-ext4@vger.kernel.org \
--cc=tytso@mit.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.