From: kbuild test robot <fengguang.wu@intel.com>
To: Peter Zijlstra <peterz@infradead.org>
Cc: kbuild-all@01.org, linux-kernel@vger.kernel.org,
tipbuild@zytor.com, Thomas Gleixner <tglx@linutronix.de>
Subject: [tip:locking/urgent 1/1] kernel/futex.c:3276:11: error: 'EMORON' undeclared; did you mean 'ELOOP'?
Date: Thu, 28 Dec 2017 22:48:16 +0800 [thread overview]
Message-ID: <201712282213.gLBeLuDM%fengguang.wu@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 2775 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git locking/urgent
head: 8f3365e34f7519904d78d9fb6dd9e4bae606b9b5
commit: 8f3365e34f7519904d78d9fb6dd9e4bae606b9b5 [1/1] futex: Sanitize user address in set_robust_list()
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout 8f3365e34f7519904d78d9fb6dd9e4bae606b9b5
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All errors (new ones prefixed by >>):
kernel/futex.c: In function 'SYSC_set_robust_list':
>> kernel/futex.c:3276:11: error: 'EMORON' undeclared (first use in this function); did you mean 'ELOOP'?
return -EMORON;
^~~~~~
ELOOP
kernel/futex.c:3276:11: note: each undeclared identifier is reported only once for each function it appears in
vim +3276 kernel/futex.c
3241
3242 /*
3243 * Support for robust futexes: the kernel cleans up held futexes at
3244 * thread exit time.
3245 *
3246 * Implementation: user-space maintains a per-thread list of locks it
3247 * is holding. Upon do_exit(), the kernel carefully walks this list,
3248 * and marks all locks that are owned by this thread with the
3249 * FUTEX_OWNER_DIED bit, and wakes up a waiter (if any). The list is
3250 * always manipulated with the lock held, so the list is private and
3251 * per-thread. Userspace also maintains a per-thread 'list_op_pending'
3252 * field, to allow the kernel to clean up if the thread dies after
3253 * acquiring the lock, but just before it could have added itself to
3254 * the list. There can only be one such pending lock.
3255 */
3256
3257 /**
3258 * sys_set_robust_list() - Set the robust-futex list head of a task
3259 * @head: pointer to the list-head
3260 * @len: length of the list-head, as userspace expects
3261 */
3262 SYSCALL_DEFINE2(set_robust_list, struct robust_list_head __user *, head,
3263 size_t, len)
3264 {
3265 unsigned long address = (unsigned long)head;
3266
3267 if (!futex_cmpxchg_enabled)
3268 return -ENOSYS;
3269 /*
3270 * The kernel knows only one size for now:
3271 */
3272 if (unlikely(len != sizeof(*head)))
3273 return -EINVAL;
3274
3275 if (unlikely(address % __alignof__(*head)))
> 3276 return -EMORON;
3277
3278 current->robust_list = head;
3279
3280 return 0;
3281 }
3282
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 52884 bytes --]
reply other threads:[~2017-12-28 14:48 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=201712282213.gLBeLuDM%fengguang.wu@intel.com \
--to=fengguang.wu@intel.com \
--cc=kbuild-all@01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=peterz@infradead.org \
--cc=tglx@linutronix.de \
--cc=tipbuild@zytor.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
all inboxes | Powered by JetHome®