From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org,
Gabriel Krisman Bertazi <krisman@collabora.com>,
hughd@google.com, akpm@linux-foundation.org, amir73il@gmail.com
Cc: lkp@intel.com, kbuild-all@lists.01.org, viro@zeniv.linux.org.uk,
Gabriel Krisman Bertazi <krisman@collabora.com>,
kernel@collabora.com, Khazhismel Kumykov <khazhy@google.com>,
Linux MM <linux-mm@kvack.org>,
linux-fsdevel <linux-fsdevel@vger.kernel.org>
Subject: Re: [PATCH v3 2/3] shmem: Introduce /sys/fs/tmpfs support
Date: Fri, 22 Apr 2022 12:54:33 +0300 [thread overview]
Message-ID: <202204200819.72S8HjcF-lkp@intel.com> (raw)
In-Reply-To: <20220418213713.273050-3-krisman@collabora.com>
Hi Gabriel,
url: https://github.com/intel-lab-lkp/linux/commits/Gabriel-Krisman-Bertazi/shmem-Allow-userspace-monitoring-of-tmpfs-for-lack-of-space/20220419-054011
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b2d229d4ddb17db541098b83524d901257e93845
config: ia64-randconfig-m031-20220418 (https://download.01.org/0day-ci/archive/20220420/202204200819.72S8HjcF-lkp@intel.com/config)
compiler: ia64-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
mm/shmem.c:3965 shmem_init() warn: passing zero to 'ERR_PTR'
vim +/ERR_PTR +3965 mm/shmem.c
41ffe5d5ceef7f Hugh Dickins 2011-08-03 3928 int __init shmem_init(void)
^1da177e4c3f41 Linus Torvalds 2005-04-16 3929 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 3930 int error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 3931
9a8ec03ed022b7 weiping zhang 2017-11-15 3932 shmem_init_inodecache();
^1da177e4c3f41 Linus Torvalds 2005-04-16 3933
41ffe5d5ceef7f Hugh Dickins 2011-08-03 3934 error = register_filesystem(&shmem_fs_type);
^1da177e4c3f41 Linus Torvalds 2005-04-16 3935 if (error) {
1170532bb49f94 Joe Perches 2016-03-17 3936 pr_err("Could not register tmpfs\n");
^1da177e4c3f41 Linus Torvalds 2005-04-16 3937 goto out2;
^1da177e4c3f41 Linus Torvalds 2005-04-16 3938 }
95dc112a5770dc Greg Kroah-Hartman 2005-06-20 3939
e43933b9793ad3 Gabriel Krisman Bertazi 2022-04-18 3940 shmem_root = kobject_create_and_add("tmpfs", fs_kobj);
e43933b9793ad3 Gabriel Krisman Bertazi 2022-04-18 3941 if (!shmem_root)
e43933b9793ad3 Gabriel Krisman Bertazi 2022-04-18 3942 goto out1;
error = -ENOMEM;
e43933b9793ad3 Gabriel Krisman Bertazi 2022-04-18 3943
ca4e05195dbc25 Al Viro 2013-08-31 3944 shm_mnt = kern_mount(&shmem_fs_type);
^1da177e4c3f41 Linus Torvalds 2005-04-16 3945 if (IS_ERR(shm_mnt)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 3946 error = PTR_ERR(shm_mnt);
1170532bb49f94 Joe Perches 2016-03-17 3947 pr_err("Could not kern_mount tmpfs\n");
e43933b9793ad3 Gabriel Krisman Bertazi 2022-04-18 3948 goto put_kobj;
^1da177e4c3f41 Linus Torvalds 2005-04-16 3949 }
5a6e75f8110c97 Kirill A. Shutemov 2016-07-26 3950
396bcc5299c281 Matthew Wilcox (Oracle 2020-04-06 3951) #ifdef CONFIG_TRANSPARENT_HUGEPAGE
435c0b87d661da Kirill A. Shutemov 2017-08-25 3952 if (has_transparent_hugepage() && shmem_huge > SHMEM_HUGE_DENY)
5a6e75f8110c97 Kirill A. Shutemov 2016-07-26 3953 SHMEM_SB(shm_mnt->mnt_sb)->huge = shmem_huge;
5a6e75f8110c97 Kirill A. Shutemov 2016-07-26 3954 else
5e6e5a12a44ca5 Hugh Dickins 2021-09-02 3955 shmem_huge = SHMEM_HUGE_NEVER; /* just in case it was patched */
5a6e75f8110c97 Kirill A. Shutemov 2016-07-26 3956 #endif
^1da177e4c3f41 Linus Torvalds 2005-04-16 3957 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 3958
e43933b9793ad3 Gabriel Krisman Bertazi 2022-04-18 3959 put_kobj:
e43933b9793ad3 Gabriel Krisman Bertazi 2022-04-18 3960 kobject_put(shmem_root);
^1da177e4c3f41 Linus Torvalds 2005-04-16 3961 out1:
41ffe5d5ceef7f Hugh Dickins 2011-08-03 3962 unregister_filesystem(&shmem_fs_type);
^1da177e4c3f41 Linus Torvalds 2005-04-16 3963 out2:
41ffe5d5ceef7f Hugh Dickins 2011-08-03 3964 shmem_destroy_inodecache();
^1da177e4c3f41 Linus Torvalds 2005-04-16 @3965 shm_mnt = ERR_PTR(error);
^1da177e4c3f41 Linus Torvalds 2005-04-16 3966 return error;
^1da177e4c3f41 Linus Torvalds 2005-04-16 3967 }
--
0-DAY CI Kernel Test Service
https://01.org/lkp
next prev parent reply other threads:[~2022-04-22 9:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-18 21:37 [PATCH v3 0/3] shmem: Allow userspace monitoring of tmpfs for lack of space Gabriel Krisman Bertazi
2022-04-18 21:37 ` [PATCH v3 1/3] shmem: Keep track of out-of-memory and out-of-space errors Gabriel Krisman Bertazi
2022-04-18 21:37 ` [PATCH v3 2/3] shmem: Introduce /sys/fs/tmpfs support Gabriel Krisman Bertazi
2022-04-22 9:54 ` Dan Carpenter [this message]
2022-04-18 21:37 ` [PATCH v3 3/3] shmem: Expose space and accounting error count Gabriel Krisman Bertazi
2022-04-19 3:42 ` [PATCH v3 0/3] shmem: Allow userspace monitoring of tmpfs for lack of space Andrew Morton
2022-04-19 15:28 ` Gabriel Krisman Bertazi
2022-04-21 5:33 ` Amir Goldstein
2022-04-21 22:37 ` Gabriel Krisman Bertazi
2022-04-21 23:19 ` Khazhy Kumykov
2022-04-22 9:02 ` Amir Goldstein
2022-05-05 21:16 ` Gabriel Krisman Bertazi
2022-05-12 20:00 ` Gabriel Krisman Bertazi
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=202204200819.72S8HjcF-lkp@intel.com \
--to=dan.carpenter@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=amir73il@gmail.com \
--cc=hughd@google.com \
--cc=kbuild-all@lists.01.org \
--cc=kbuild@lists.01.org \
--cc=kernel@collabora.com \
--cc=khazhy@google.com \
--cc=krisman@collabora.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=viro@zeniv.linux.org.uk \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).