Re: [tip: timers/core] posix-cpu-timers: Use common permission check in posix_cpu_clock_get()

From: kbuild test robot
Date: Thu Aug 29 2019 - 07:01:01 EST

Hi tip-bot2,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc6 next-20190828]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

config: parisc-c3000_defconfig (attached as .config)
compiler: hppa-linux-gcc (GCC) 7.4.0
wget -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=parisc

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

All error/warnings (new ones prefixed by >>):

kernel/time/posix-cpu-timers.c: In function 'posix_cpu_clock_get':
>> kernel/time/posix-cpu-timers.c:275:8: error: implicit declaration of function 'get_task_for_clock'; did you mean 'get_task_struct'? [-Werror=implicit-function-declaration]
tsk = get_task_for_clock(clock);
>> kernel/time/posix-cpu-timers.c:275:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
tsk = get_task_for_clock(clock);
cc1: some warnings being treated as errors

vim +275 kernel/time/posix-cpu-timers.c

269 static int posix_cpu_clock_get(const clockid_t clock, struct timespec64 *tp)
270 {
271 const clockid_t clkid = CPUCLOCK_WHICH(clock);
272 struct task_struct *tsk;
273 u64 t;
> 275 tsk = get_task_for_clock(clock);
276 if (!tsk)
277 return -EINVAL;
279 if (CPUCLOCK_PERTHREAD(clock))
280 cpu_clock_sample(clkid, tsk, &t);
281 else
282 cpu_clock_sample_group(clkid, tsk, &t);
283 put_task_struct(tsk);
285 *tp = ns_to_timespec64(t);
286 return 0;
287 }

0-DAY kernel test infrastructure Open Source Technology Center Intel Corporation

Attachment: .config.gz
Description: application/gzip