From: kbuild test robot <fengguang.wu@intel.com>
To: Davidlohr Bueso <davidlohr.bueso@hp.com>
Cc: kbuild-all@01.org, Sasha Levin <sasha.levin@oracle.com>,
Andrew Morton <akpm@linux-foundation.org>,
Linux Memory Management List <linux-mm@kvack.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: [sashal-linux-stable-security:linux-3.10.y-security 204/1330] ipc/shm.c:923:3: error: implicit declaration of function 'shm_obtain_object_check'
Date: Fri, 12 Aug 2016 08:07:26 +0800 [thread overview]
Message-ID: <201608120824.OL3ed94I%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2993 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable-security.git linux-3.10.y-security
head: 5727b476fa7962e1849e7ba00870eb62dd1c9592
commit: fc3323c39215f276c710a0eaad6fbf78bafa4eac [204/1330] ipc,shm: shorten critical region for shmctl
config: i386-defconfig (attached as .config)
compiler: gcc-4.9 (Debian 4.9.3-14) 4.9.3
reproduce:
git checkout fc3323c39215f276c710a0eaad6fbf78bafa4eac
# save the attached .config to linux build tree
make ARCH=i386
All error/warnings (new ones prefixed by >>):
ipc/shm.c: In function 'SYSC_shmctl':
>> ipc/shm.c:923:3: error: implicit declaration of function 'shm_obtain_object_check' [-Werror=implicit-function-declaration]
shp = shm_obtain_object_check(ns, shmid);
^
>> ipc/shm.c:923:7: warning: assignment makes pointer from integer without a cast
shp = shm_obtain_object_check(ns, shmid);
^
>> ipc/shm.c:966:3: error: implicit declaration of function 'ipc_unlock_object' [-Werror=implicit-function-declaration]
ipc_unlock_object(&shp->shm_perm);
^
cc1: some warnings being treated as errors
vim +/shm_obtain_object_check +923 ipc/shm.c
917 case SHM_LOCK:
918 case SHM_UNLOCK:
919 {
920 struct file *shm_file;
921
922 rcu_read_lock();
> 923 shp = shm_obtain_object_check(ns, shmid);
924 if (IS_ERR(shp)) {
925 err = PTR_ERR(shp);
926 goto out_unlock1;
927 }
928
929 audit_ipc_obj(&(shp->shm_perm));
930 err = security_shm_shmctl(shp, cmd);
931 if (err)
932 goto out_unlock1;
933
934 ipc_lock_object(&shp->shm_perm);
935 if (!ns_capable(ns->user_ns, CAP_IPC_LOCK)) {
936 kuid_t euid = current_euid();
937 err = -EPERM;
938 if (!uid_eq(euid, shp->shm_perm.uid) &&
939 !uid_eq(euid, shp->shm_perm.cuid))
940 goto out_unlock0;
941 if (cmd == SHM_LOCK && !rlimit(RLIMIT_MEMLOCK))
942 goto out_unlock0;
943 }
944
945 shm_file = shp->shm_file;
946 if (is_file_hugepages(shm_file))
947 goto out_unlock0;
948
949 if (cmd == SHM_LOCK) {
950 struct user_struct *user = current_user();
951 err = shmem_lock(shm_file, 1, user);
952 if (!err && !(shp->shm_perm.mode & SHM_LOCKED)) {
953 shp->shm_perm.mode |= SHM_LOCKED;
954 shp->mlock_user = user;
955 }
956 goto out_unlock0;
957 }
958
959 /* SHM_UNLOCK */
960 if (!(shp->shm_perm.mode & SHM_LOCKED))
961 goto out_unlock0;
962 shmem_lock(shm_file, 0, shp->mlock_user);
963 shp->shm_perm.mode &= ~SHM_LOCKED;
964 shp->mlock_user = NULL;
965 get_file(shm_file);
> 966 ipc_unlock_object(&shp->shm_perm);
967 rcu_read_unlock();
968 shmem_unlock_mapping(shm_file->f_mapping);
969
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/octet-stream, Size: 20893 bytes --]
reply other threads:[~2016-08-12 0:08 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=201608120824.OL3ed94I%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=akpm@linux-foundation.org \
--cc=davidlohr.bueso@hp.com \
--cc=gregkh@linuxfoundation.org \
--cc=kbuild-all@01.org \
--cc=linux-mm@kvack.org \
--cc=sasha.levin@oracle.com \
/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