Re: [PATCH 5/5] vdpasim: vDPA device simulator
by Dan Carpenter
Hi Jason,
url: https://github.com/0day-ci/linux/commits/Jason-Wang/vDPA-support/20200117...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/virtio/vdpa/vdpa_sim.c:288 vdpasim_alloc_coherent() warn: returning freed memory 'addr'
# https://github.com/0day-ci/linux/commit/55047769b3e974d68b2aab5ce0022459b...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 55047769b3e974d68b2aab5ce0022459b172a23f
vim +/addr +288 drivers/virtio/vdpa/vdpa_sim.c
55047769b3e974 Jason Wang 2020-01-16 263 static void *vdpasim_alloc_coherent(struct device *dev, size_t size,
55047769b3e974 Jason Wang 2020-01-16 264 dma_addr_t *dma_addr, gfp_t flag,
55047769b3e974 Jason Wang 2020-01-16 265 unsigned long attrs)
55047769b3e974 Jason Wang 2020-01-16 266 {
55047769b3e974 Jason Wang 2020-01-16 267 struct vdpa_device *vdpa = dev_to_vdpa(dev);
55047769b3e974 Jason Wang 2020-01-16 268 struct vdpasim *vdpasim = vdpa_to_sim(vdpa);
55047769b3e974 Jason Wang 2020-01-16 269 struct vhost_iotlb *iommu = vdpasim->iommu;
55047769b3e974 Jason Wang 2020-01-16 270 void *addr = kmalloc(size, flag);
55047769b3e974 Jason Wang 2020-01-16 271 int ret;
55047769b3e974 Jason Wang 2020-01-16 272
55047769b3e974 Jason Wang 2020-01-16 273 if (!addr)
55047769b3e974 Jason Wang 2020-01-16 274 *dma_addr = DMA_MAPPING_ERROR;
55047769b3e974 Jason Wang 2020-01-16 275 else {
55047769b3e974 Jason Wang 2020-01-16 276 u64 pa = virt_to_phys(addr);
55047769b3e974 Jason Wang 2020-01-16 277
55047769b3e974 Jason Wang 2020-01-16 278 ret = vhost_iotlb_add_range(iommu, (u64)pa,
55047769b3e974 Jason Wang 2020-01-16 279 (u64)pa + size - 1,
55047769b3e974 Jason Wang 2020-01-16 280 pa, VHOST_MAP_RW);
55047769b3e974 Jason Wang 2020-01-16 281 if (ret) {
55047769b3e974 Jason Wang 2020-01-16 282 kfree(addr);
^^^^^^^^^^^
55047769b3e974 Jason Wang 2020-01-16 283 *dma_addr = DMA_MAPPING_ERROR;
55047769b3e974 Jason Wang 2020-01-16 284 } else
55047769b3e974 Jason Wang 2020-01-16 285 *dma_addr = (dma_addr_t)pa;
55047769b3e974 Jason Wang 2020-01-16 286 }
55047769b3e974 Jason Wang 2020-01-16 287
55047769b3e974 Jason Wang 2020-01-16 @288 return addr;
^^^^^^^^^^^^
55047769b3e974 Jason Wang 2020-01-16 289 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[brauner:pidfd_capabilities 5/7] kernel/fork.c:2388 copy_process() warn: passing zero to 'ERR_PTR'
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git pidfd_capabilities
head: 39f8e5a5a89ad52ff07fd5af7e514def2b527ed5
commit: f661df61f0498a3bffb2ff4549d5515e94a05735 [5/7] pidfd: introduce and port to pidfd_struct
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
kernel/fork.c:2388 copy_process() warn: passing zero to 'ERR_PTR'
kernel/fork.c:2388 copy_process() warn: inconsistent returns 'irq'.
# https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/commit/...
git remote add brauner https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
git remote update brauner
git checkout f661df61f0498a3bffb2ff4549d5515e94a05735
vim +/ERR_PTR +2388 kernel/fork.c
3c90e6e99b08f0 Srivatsa Vaddagiri 2007-11-09 2069 /* Perform scheduler related setup. Assign this task to a CPU. */
aab03e05e8f7e2 Dario Faggioli 2013-11-28 2070 retval = sched_fork(clone_flags, p);
aab03e05e8f7e2 Dario Faggioli 2013-11-28 2071 if (retval)
aab03e05e8f7e2 Dario Faggioli 2013-11-28 2072 goto bad_fork_cleanup_policy;
6ab423e0eaca82 Peter Zijlstra 2009-05-25 2073
cdd6c482c9ff9c Ingo Molnar 2009-09-21 2074 retval = perf_event_init_task(p);
6ab423e0eaca82 Peter Zijlstra 2009-05-25 2075 if (retval)
6ab423e0eaca82 Peter Zijlstra 2009-05-25 2076 goto bad_fork_cleanup_policy;
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2077 retval = audit_alloc(p);
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2078 if (retval)
6c72e3501d0d62 Peter Zijlstra 2014-10-02 2079 goto bad_fork_cleanup_perf;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2080 /* copy all the process information */
ab602f79915939 Jack Miller 2014-08-08 2081 shm_init_task(p);
e4e55b47ed9ae2 Tetsuo Handa 2017-03-24 2082 retval = security_task_alloc(p, clone_flags);
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2083 if (retval)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2084 goto bad_fork_cleanup_audit;
e4e55b47ed9ae2 Tetsuo Handa 2017-03-24 2085 retval = copy_semundo(clone_flags, p);
e4e55b47ed9ae2 Tetsuo Handa 2017-03-24 2086 if (retval)
e4e55b47ed9ae2 Tetsuo Handa 2017-03-24 2087 goto bad_fork_cleanup_security;
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2088 retval = copy_files(clone_flags, p);
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2089 if (retval)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2090 goto bad_fork_cleanup_semundo;
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2091 retval = copy_fs(clone_flags, p);
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2092 if (retval)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2093 goto bad_fork_cleanup_files;
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2094 retval = copy_sighand(clone_flags, p);
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2095 if (retval)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2096 goto bad_fork_cleanup_fs;
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2097 retval = copy_signal(clone_flags, p);
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2098 if (retval)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2099 goto bad_fork_cleanup_sighand;
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2100 retval = copy_mm(clone_flags, p);
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2101 if (retval)
^1da177e4c3f41 Linus Torvalds 2005-04-16 2102 goto bad_fork_cleanup_signal;
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2103 retval = copy_namespaces(clone_flags, p);
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2104 if (retval)
d84f4f992cbd76 David Howells 2008-11-14 2105 goto bad_fork_cleanup_mm;
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2106 retval = copy_io(clone_flags, p);
fb0a685cb95a02 Daniel Rebelo de Oliveira 2011-07-26 2107 if (retval)
fd0928df98b957 Jens Axboe 2008-01-24 2108 goto bad_fork_cleanup_namespaces;
7f192e3cd316ba Christian Brauner 2019-05-25 2109 retval = copy_thread_tls(clone_flags, args->stack, args->stack_size, p,
7f192e3cd316ba Christian Brauner 2019-05-25 2110 args->tls);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2111 if (retval)
fd0928df98b957 Jens Axboe 2008-01-24 2112 goto bad_fork_cleanup_io;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2113
afaef01c001537 Alexander Popov 2018-08-17 2114 stackleak_task_init(p);
afaef01c001537 Alexander Popov 2018-08-17 2115
425fb2b4bf5dde Pavel Emelyanov 2007-10-18 2116 if (pid != &init_struct_pid) {
49cb2fc42ce4b7 Adrian Reber 2019-11-15 2117 pid = alloc_pid(p->nsproxy->pid_ns_for_children, args->set_tid,
49cb2fc42ce4b7 Adrian Reber 2019-11-15 2118 args->set_tid_size);
35f71bc0a09a45 Michal Hocko 2015-04-16 2119 if (IS_ERR(pid)) {
35f71bc0a09a45 Michal Hocko 2015-04-16 2120 retval = PTR_ERR(pid);
0740aa5f637568 Jiri Slaby 2016-05-20 2121 goto bad_fork_cleanup_thread;
425fb2b4bf5dde Pavel Emelyanov 2007-10-18 2122 }
35f71bc0a09a45 Michal Hocko 2015-04-16 2123 }
425fb2b4bf5dde Pavel Emelyanov 2007-10-18 2124
b3e5838252665e Christian Brauner 2019-03-27 2125 /*
b3e5838252665e Christian Brauner 2019-03-27 2126 * This has to happen after we've potentially unshared the file
b3e5838252665e Christian Brauner 2019-03-27 2127 * descriptor table (so that the pidfd doesn't leak into the child
b3e5838252665e Christian Brauner 2019-03-27 2128 * if the fd table isn't shared).
b3e5838252665e Christian Brauner 2019-03-27 2129 */
b3e5838252665e Christian Brauner 2019-03-27 2130 if (clone_flags & CLONE_PIDFD) {
f661df61f0498a Christian Brauner 2020-01-13 2131 struct pidfd_struct *pidfd_struct;
f661df61f0498a Christian Brauner 2020-01-13 2132
f661df61f0498a Christian Brauner 2020-01-13 2133 pidfd_struct = pidfd_alloc(pid);
f661df61f0498a Christian Brauner 2020-01-13 2134 if (IS_ERR(pidfd_struct))
f661df61f0498a Christian Brauner 2020-01-13 2135 goto bad_fork_free_pid;
^^^^^^^^^^^^^^^^^^^^^^
retval not set.
f661df61f0498a Christian Brauner 2020-01-13 2136
6fd2fe494b17bf Al Viro 2019-06-26 2137 retval = get_unused_fd_flags(O_RDWR | O_CLOEXEC);
f661df61f0498a Christian Brauner 2020-01-13 2138 if (retval < 0) {
f661df61f0498a Christian Brauner 2020-01-13 2139 pidfd_put(pidfd_struct);
b3e5838252665e Christian Brauner 2019-03-27 2140 goto bad_fork_free_pid;
f661df61f0498a Christian Brauner 2020-01-13 2141 }
b3e5838252665e Christian Brauner 2019-03-27 2142
b3e5838252665e Christian Brauner 2019-03-27 2143 pidfd = retval;
6fd2fe494b17bf Al Viro 2019-06-26 2144
f661df61f0498a Christian Brauner 2020-01-13 2145 pidfile = anon_inode_getfile("[pidfd]", &pidfd_fops,
f661df61f0498a Christian Brauner 2020-01-13 2146 pidfd_struct, O_RDWR | O_CLOEXEC);
6fd2fe494b17bf Al Viro 2019-06-26 2147 if (IS_ERR(pidfile)) {
6fd2fe494b17bf Al Viro 2019-06-26 2148 put_unused_fd(pidfd);
f661df61f0498a Christian Brauner 2020-01-13 2149 pidfd_put(pidfd_struct);
28dd29c06d0ded Christian Brauner 2019-07-01 2150 retval = PTR_ERR(pidfile);
6fd2fe494b17bf Al Viro 2019-06-26 2151 goto bad_fork_free_pid;
6fd2fe494b17bf Al Viro 2019-06-26 2152 }
6fd2fe494b17bf Al Viro 2019-06-26 2153
7f192e3cd316ba Christian Brauner 2019-05-25 2154 retval = put_user(pidfd, args->pidfd);
b3e5838252665e Christian Brauner 2019-03-27 2155 if (retval)
b3e5838252665e Christian Brauner 2019-03-27 2156 goto bad_fork_put_pidfd;
b3e5838252665e Christian Brauner 2019-03-27 2157 }
b3e5838252665e Christian Brauner 2019-03-27 2158
73c101011926c5 Jens Axboe 2011-03-08 2159 #ifdef CONFIG_BLOCK
73c101011926c5 Jens Axboe 2011-03-08 2160 p->plug = NULL;
73c101011926c5 Jens Axboe 2011-03-08 2161 #endif
ba31c1a4853899 Thomas Gleixner 2019-11-06 2162 futex_init_task(p);
ba31c1a4853899 Thomas Gleixner 2019-11-06 2163
f9a3879abf2f1a GOTO Masanori 2006-03-13 2164 /*
f9a3879abf2f1a GOTO Masanori 2006-03-13 2165 * sigaltstack should be cleared when sharing the same VM
f9a3879abf2f1a GOTO Masanori 2006-03-13 2166 */
f9a3879abf2f1a GOTO Masanori 2006-03-13 2167 if ((clone_flags & (CLONE_VM|CLONE_VFORK)) == CLONE_VM)
2a74213838104a Stas Sergeev 2016-04-14 2168 sas_ss_reset(p);
f9a3879abf2f1a GOTO Masanori 2006-03-13 2169
^1da177e4c3f41 Linus Torvalds 2005-04-16 2170 /*
6580807da14c42 Oleg Nesterov 2009-12-15 2171 * Syscall tracing and stepping should be turned off in the
6580807da14c42 Oleg Nesterov 2009-12-15 2172 * child regardless of CLONE_PTRACE.
^1da177e4c3f41 Linus Torvalds 2005-04-16 2173 */
6580807da14c42 Oleg Nesterov 2009-12-15 2174 user_disable_single_step(p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2175 clear_tsk_thread_flag(p, TIF_SYSCALL_TRACE);
ed75e8d58010fd Laurent Vivier 2005-09-03 2176 #ifdef TIF_SYSCALL_EMU
ed75e8d58010fd Laurent Vivier 2005-09-03 2177 clear_tsk_thread_flag(p, TIF_SYSCALL_EMU);
ed75e8d58010fd Laurent Vivier 2005-09-03 2178 #endif
e02c9b0d65a749 Lin Feng 2019-05-14 2179 clear_tsk_latency_tracing(p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2180
^1da177e4c3f41 Linus Torvalds 2005-04-16 2181 /* ok, now we should be set up.. */
18c830df771f2b Oleg Nesterov 2013-07-03 2182 p->pid = pid_nr(pid);
18c830df771f2b Oleg Nesterov 2013-07-03 2183 if (clone_flags & CLONE_THREAD) {
5f8aadd8b9966d Oleg Nesterov 2012-03-14 2184 p->exit_signal = -1;
18c830df771f2b Oleg Nesterov 2013-07-03 2185 p->group_leader = current->group_leader;
18c830df771f2b Oleg Nesterov 2013-07-03 2186 p->tgid = current->tgid;
18c830df771f2b Oleg Nesterov 2013-07-03 2187 } else {
18c830df771f2b Oleg Nesterov 2013-07-03 2188 if (clone_flags & CLONE_PARENT)
5f8aadd8b9966d Oleg Nesterov 2012-03-14 2189 p->exit_signal = current->group_leader->exit_signal;
5f8aadd8b9966d Oleg Nesterov 2012-03-14 2190 else
7f192e3cd316ba Christian Brauner 2019-05-25 2191 p->exit_signal = args->exit_signal;
18c830df771f2b Oleg Nesterov 2013-07-03 2192 p->group_leader = p;
18c830df771f2b Oleg Nesterov 2013-07-03 2193 p->tgid = p->pid;
18c830df771f2b Oleg Nesterov 2013-07-03 2194 }
5f8aadd8b9966d Oleg Nesterov 2012-03-14 2195
9d823e8f6b1b7b Wu Fengguang 2011-06-11 2196 p->nr_dirtied = 0;
9d823e8f6b1b7b Wu Fengguang 2011-06-11 2197 p->nr_dirtied_pause = 128 >> (PAGE_SHIFT - 10);
83712358ba0a14 Wu Fengguang 2011-06-11 2198 p->dirty_paused_when = 0;
9d823e8f6b1b7b Wu Fengguang 2011-06-11 2199
bb8cbbfee68518 Oleg Nesterov 2013-11-13 2200 p->pdeath_signal = 0;
47e65328a7b1cd Oleg Nesterov 2006-03-28 2201 INIT_LIST_HEAD(&p->thread_group);
158e1645e07f3e Al Viro 2012-06-27 2202 p->task_works = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2203
780de9dd2720de Ingo Molnar 2017-02-02 2204 cgroup_threadgroup_change_begin(current);
7e47682ea555e7 Aleksa Sarai 2015-06-09 2205 /*
7e47682ea555e7 Aleksa Sarai 2015-06-09 2206 * Ensure that the cgroup subsystem policies allow the new process to be
7e47682ea555e7 Aleksa Sarai 2015-06-09 2207 * forked. It should be noted the the new process's css_set can be changed
7e47682ea555e7 Aleksa Sarai 2015-06-09 2208 * between here and cgroup_post_fork() if an organisation operation is in
7e47682ea555e7 Aleksa Sarai 2015-06-09 2209 * progress.
7e47682ea555e7 Aleksa Sarai 2015-06-09 2210 */
b53202e6308939 Oleg Nesterov 2015-12-03 2211 retval = cgroup_can_fork(p);
7e47682ea555e7 Aleksa Sarai 2015-06-09 2212 if (retval)
c3b7112df86b76 Christian Brauner 2019-05-10 2213 goto bad_fork_cgroup_threadgroup_change_end;
7e47682ea555e7 Aleksa Sarai 2015-06-09 2214
7b55851367136b David Herrmann 2019-01-08 2215 /*
7b55851367136b David Herrmann 2019-01-08 2216 * From this point on we must avoid any synchronous user-space
7b55851367136b David Herrmann 2019-01-08 2217 * communication until we take the tasklist-lock. In particular, we do
7b55851367136b David Herrmann 2019-01-08 2218 * not want user-space to be able to predict the process start-time by
7b55851367136b David Herrmann 2019-01-08 2219 * stalling fork(2) after we recorded the start_time but before it is
7b55851367136b David Herrmann 2019-01-08 2220 * visible to the system.
7b55851367136b David Herrmann 2019-01-08 2221 */
7b55851367136b David Herrmann 2019-01-08 2222
7b55851367136b David Herrmann 2019-01-08 2223 p->start_time = ktime_get_ns();
cf25e24db61cc9 Peter Zijlstra 2019-11-07 2224 p->start_boottime = ktime_get_boottime_ns();
7b55851367136b David Herrmann 2019-01-08 2225
18c830df771f2b Oleg Nesterov 2013-07-03 2226 /*
18c830df771f2b Oleg Nesterov 2013-07-03 2227 * Make it visible to the rest of the system, but dont wake it up yet.
18c830df771f2b Oleg Nesterov 2013-07-03 2228 * Need tasklist lock for parent etc handling!
18c830df771f2b Oleg Nesterov 2013-07-03 2229 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2230 write_lock_irq(&tasklist_lock);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2231
^1da177e4c3f41 Linus Torvalds 2005-04-16 2232 /* CLONE_PARENT re-uses the old parent */
2d5516cbb9daf7 Oleg Nesterov 2009-03-02 2233 if (clone_flags & (CLONE_PARENT|CLONE_THREAD)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2234 p->real_parent = current->real_parent;
2d5516cbb9daf7 Oleg Nesterov 2009-03-02 2235 p->parent_exec_id = current->parent_exec_id;
2d5516cbb9daf7 Oleg Nesterov 2009-03-02 2236 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 2237 p->real_parent = current;
2d5516cbb9daf7 Oleg Nesterov 2009-03-02 2238 p->parent_exec_id = current->self_exec_id;
2d5516cbb9daf7 Oleg Nesterov 2009-03-02 2239 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2240
d83a7cb375eec2 Josh Poimboeuf 2017-02-13 2241 klp_copy_process(p);
d83a7cb375eec2 Josh Poimboeuf 2017-02-13 2242
^1da177e4c3f41 Linus Torvalds 2005-04-16 2243 spin_lock(¤t->sighand->siglock);
4a2c7a7837da1b Oleg Nesterov 2006-03-28 2244
dbd952127d11bb Kees Cook 2014-06-27 2245 /*
dbd952127d11bb Kees Cook 2014-06-27 2246 * Copy seccomp details explicitly here, in case they were changed
dbd952127d11bb Kees Cook 2014-06-27 2247 * before holding sighand lock.
dbd952127d11bb Kees Cook 2014-06-27 2248 */
dbd952127d11bb Kees Cook 2014-06-27 2249 copy_seccomp(p);
dbd952127d11bb Kees Cook 2014-06-27 2250
d7822b1e24f2df Mathieu Desnoyers 2018-06-02 2251 rseq_fork(p, clone_flags);
d7822b1e24f2df Mathieu Desnoyers 2018-06-02 2252
4ca1d3ee46130e Eric W. Biederman 2018-07-13 2253 /* Don't start children in a dying pid namespace */
e8cfbc245e2488 Gargi Sharma 2017-11-17 2254 if (unlikely(!(ns_of_pid(pid)->pid_allocated & PIDNS_ADDING))) {
3fd37226216620 Kirill Tkhai 2017-05-12 2255 retval = -ENOMEM;
3fd37226216620 Kirill Tkhai 2017-05-12 2256 goto bad_fork_cancel_cgroup;
3fd37226216620 Kirill Tkhai 2017-05-12 2257 }
4a2c7a7837da1b Oleg Nesterov 2006-03-28 2258
7673bf553b2732 Eric W. Biederman 2018-07-23 2259 /* Let kill terminate clone/fork in the middle */
7673bf553b2732 Eric W. Biederman 2018-07-23 2260 if (fatal_signal_pending(current)) {
7673bf553b2732 Eric W. Biederman 2018-07-23 2261 retval = -EINTR;
7673bf553b2732 Eric W. Biederman 2018-07-23 2262 goto bad_fork_cancel_cgroup;
7673bf553b2732 Eric W. Biederman 2018-07-23 2263 }
7673bf553b2732 Eric W. Biederman 2018-07-23 2264
6fd2fe494b17bf Al Viro 2019-06-26 2265 /* past the last point of failure */
6fd2fe494b17bf Al Viro 2019-06-26 2266 if (pidfile)
6fd2fe494b17bf Al Viro 2019-06-26 2267 fd_install(pidfd, pidfile);
4a2c7a7837da1b Oleg Nesterov 2006-03-28 2268
2c4704756cab7c Eric W. Biederman 2017-09-26 2269 init_task_pid_links(p);
73b9ebfe126a4a Oleg Nesterov 2006-03-28 2270 if (likely(p->pid)) {
4b9d33e6d83cc0 Tejun Heo 2011-06-17 2271 ptrace_init_task(p, (clone_flags & CLONE_PTRACE) || trace);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2272
8190773985141f Oleg Nesterov 2013-07-03 2273 init_task_pid(p, PIDTYPE_PID, pid);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2274 if (thread_group_leader(p)) {
6883f81aac6f44 Eric W. Biederman 2017-06-04 2275 init_task_pid(p, PIDTYPE_TGID, pid);
8190773985141f Oleg Nesterov 2013-07-03 2276 init_task_pid(p, PIDTYPE_PGID, task_pgrp(current));
8190773985141f Oleg Nesterov 2013-07-03 2277 init_task_pid(p, PIDTYPE_SID, task_session(current));
8190773985141f Oleg Nesterov 2013-07-03 2278
1c4042c29bd2e8 Eric W. Biederman 2010-07-12 2279 if (is_child_reaper(pid)) {
17cf22c33e1f1b Eric W. Biederman 2010-03-02 2280 ns_of_pid(pid)->child_reaper = p;
1c4042c29bd2e8 Eric W. Biederman 2010-07-12 2281 p->signal->flags |= SIGNAL_UNKILLABLE;
1c4042c29bd2e8 Eric W. Biederman 2010-07-12 2282 }
c3ad2c3b02e953 Eric W. Biederman 2018-07-23 2283 p->signal->shared_pending.signal = delayed.signal;
9c9f4ded90a59e Alan Cox 2008-10-13 2284 p->signal->tty = tty_kref_get(current->signal->tty);
749860ce242798 Pavel Tikhomirov 2017-01-30 2285 /*
749860ce242798 Pavel Tikhomirov 2017-01-30 2286 * Inherit has_child_subreaper flag under the same
749860ce242798 Pavel Tikhomirov 2017-01-30 2287 * tasklist_lock with adding child to the process tree
749860ce242798 Pavel Tikhomirov 2017-01-30 2288 * for propagate_has_child_subreaper optimization.
749860ce242798 Pavel Tikhomirov 2017-01-30 2289 */
749860ce242798 Pavel Tikhomirov 2017-01-30 2290 p->signal->has_child_subreaper = p->real_parent->signal->has_child_subreaper ||
749860ce242798 Pavel Tikhomirov 2017-01-30 2291 p->real_parent->signal->is_child_subreaper;
9cd80bbb07fcd6 Oleg Nesterov 2009-12-17 2292 list_add_tail(&p->sibling, &p->real_parent->children);
5e85d4abe3f43b Eric W. Biederman 2006-04-18 2293 list_add_tail_rcu(&p->tasks, &init_task.tasks);
6883f81aac6f44 Eric W. Biederman 2017-06-04 2294 attach_pid(p, PIDTYPE_TGID);
8190773985141f Oleg Nesterov 2013-07-03 2295 attach_pid(p, PIDTYPE_PGID);
8190773985141f Oleg Nesterov 2013-07-03 2296 attach_pid(p, PIDTYPE_SID);
909ea96468096b Christoph Lameter 2010-12-08 2297 __this_cpu_inc(process_counts);
80628ca06c5d42 Oleg Nesterov 2013-07-03 2298 } else {
80628ca06c5d42 Oleg Nesterov 2013-07-03 2299 current->signal->nr_threads++;
80628ca06c5d42 Oleg Nesterov 2013-07-03 2300 atomic_inc(¤t->signal->live);
60d4de3ff7f775 Elena Reshetova 2019-01-18 2301 refcount_inc(¤t->signal->sigcnt);
924de3b8c9410c Eric W. Biederman 2018-07-23 2302 task_join_group_stop(p);
80628ca06c5d42 Oleg Nesterov 2013-07-03 2303 list_add_tail_rcu(&p->thread_group,
80628ca06c5d42 Oleg Nesterov 2013-07-03 2304 &p->group_leader->thread_group);
0c740d0afc3bff Oleg Nesterov 2014-01-21 2305 list_add_tail_rcu(&p->thread_node,
0c740d0afc3bff Oleg Nesterov 2014-01-21 2306 &p->signal->thread_head);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2307 }
8190773985141f Oleg Nesterov 2013-07-03 2308 attach_pid(p, PIDTYPE_PID);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2309 nr_threads++;
73b9ebfe126a4a Oleg Nesterov 2006-03-28 2310 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2311 total_forks++;
c3ad2c3b02e953 Eric W. Biederman 2018-07-23 2312 hlist_del_init(&delayed.node);
3f17da699431ec Oleg Nesterov 2006-02-15 2313 spin_unlock(¤t->sighand->siglock);
4af4206be2bd19 Oleg Nesterov 2014-04-13 2314 syscall_tracepoint_update(p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2315 write_unlock_irq(&tasklist_lock);
4af4206be2bd19 Oleg Nesterov 2014-04-13 2316
c13cf856cbe16a Andrew Morton 2005-11-28 2317 proc_fork_connector(p);
b53202e6308939 Oleg Nesterov 2015-12-03 2318 cgroup_post_fork(p);
780de9dd2720de Ingo Molnar 2017-02-02 2319 cgroup_threadgroup_change_end(current);
cdd6c482c9ff9c Ingo Molnar 2009-09-21 2320 perf_event_fork(p);
43d2b113241d67 KAMEZAWA Hiroyuki 2012-01-10 2321
43d2b113241d67 KAMEZAWA Hiroyuki 2012-01-10 2322 trace_task_newtask(p, clone_flags);
3ab679661721b1 Oleg Nesterov 2013-10-16 2323 uprobe_copy_process(p, clone_flags);
43d2b113241d67 KAMEZAWA Hiroyuki 2012-01-10 2324
^1da177e4c3f41 Linus Torvalds 2005-04-16 2325 return p;
^1da177e4c3f41 Linus Torvalds 2005-04-16 2326
7e47682ea555e7 Aleksa Sarai 2015-06-09 2327 bad_fork_cancel_cgroup:
3fd37226216620 Kirill Tkhai 2017-05-12 2328 spin_unlock(¤t->sighand->siglock);
3fd37226216620 Kirill Tkhai 2017-05-12 2329 write_unlock_irq(&tasklist_lock);
b53202e6308939 Oleg Nesterov 2015-12-03 2330 cgroup_cancel_fork(p);
c3b7112df86b76 Christian Brauner 2019-05-10 2331 bad_fork_cgroup_threadgroup_change_end:
c3b7112df86b76 Christian Brauner 2019-05-10 2332 cgroup_threadgroup_change_end(current);
b3e5838252665e Christian Brauner 2019-03-27 2333 bad_fork_put_pidfd:
6fd2fe494b17bf Al Viro 2019-06-26 2334 if (clone_flags & CLONE_PIDFD) {
6fd2fe494b17bf Al Viro 2019-06-26 2335 fput(pidfile);
6fd2fe494b17bf Al Viro 2019-06-26 2336 put_unused_fd(pidfd);
6fd2fe494b17bf Al Viro 2019-06-26 2337 }
425fb2b4bf5dde Pavel Emelyanov 2007-10-18 2338 bad_fork_free_pid:
425fb2b4bf5dde Pavel Emelyanov 2007-10-18 2339 if (pid != &init_struct_pid)
425fb2b4bf5dde Pavel Emelyanov 2007-10-18 2340 free_pid(pid);
0740aa5f637568 Jiri Slaby 2016-05-20 2341 bad_fork_cleanup_thread:
0740aa5f637568 Jiri Slaby 2016-05-20 2342 exit_thread(p);
fd0928df98b957 Jens Axboe 2008-01-24 2343 bad_fork_cleanup_io:
b69f2292063d2c Louis Rilling 2009-12-04 2344 if (p->io_context)
b69f2292063d2c Louis Rilling 2009-12-04 2345 exit_io_context(p);
ab516013ad9ca4 Serge E. Hallyn 2006-10-02 2346 bad_fork_cleanup_namespaces:
444f378b237a0f Linus Torvalds 2007-01-30 2347 exit_task_namespaces(p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2348 bad_fork_cleanup_mm:
c3f3ce049f7d97 Andrea Arcangeli 2019-05-14 2349 if (p->mm) {
c3f3ce049f7d97 Andrea Arcangeli 2019-05-14 2350 mm_clear_owner(p->mm, p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2351 mmput(p->mm);
c3f3ce049f7d97 Andrea Arcangeli 2019-05-14 2352 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2353 bad_fork_cleanup_signal:
4ab6c08336535f Oleg Nesterov 2009-08-26 2354 if (!(clone_flags & CLONE_THREAD))
1c5354de90c900 Mike Galbraith 2011-01-05 2355 free_signal_struct(p->signal);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2356 bad_fork_cleanup_sighand:
a7e5328a06a2be Oleg Nesterov 2006-03-28 2357 __cleanup_sighand(p->sighand);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2358 bad_fork_cleanup_fs:
^1da177e4c3f41 Linus Torvalds 2005-04-16 2359 exit_fs(p); /* blocking */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2360 bad_fork_cleanup_files:
^1da177e4c3f41 Linus Torvalds 2005-04-16 2361 exit_files(p); /* blocking */
^1da177e4c3f41 Linus Torvalds 2005-04-16 2362 bad_fork_cleanup_semundo:
^1da177e4c3f41 Linus Torvalds 2005-04-16 2363 exit_sem(p);
e4e55b47ed9ae2 Tetsuo Handa 2017-03-24 2364 bad_fork_cleanup_security:
e4e55b47ed9ae2 Tetsuo Handa 2017-03-24 2365 security_task_free(p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2366 bad_fork_cleanup_audit:
^1da177e4c3f41 Linus Torvalds 2005-04-16 2367 audit_free(p);
6c72e3501d0d62 Peter Zijlstra 2014-10-02 2368 bad_fork_cleanup_perf:
cdd6c482c9ff9c Ingo Molnar 2009-09-21 2369 perf_event_free_task(p);
6c72e3501d0d62 Peter Zijlstra 2014-10-02 2370 bad_fork_cleanup_policy:
b09be676e0ff25 Byungchul Park 2017-08-07 2371 lockdep_free_task(p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2372 #ifdef CONFIG_NUMA
f0be3d32b05d3f Lee Schermerhorn 2008-04-28 2373 mpol_put(p->mempolicy);
e8604cb43690b7 Li Zefan 2014-03-28 2374 bad_fork_cleanup_threadgroup_lock:
^1da177e4c3f41 Linus Torvalds 2005-04-16 2375 #endif
35df17c57cecb0 Shailabh Nagar 2006-08-31 2376 delayacct_tsk_free(p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2377 bad_fork_cleanup_count:
d84f4f992cbd76 David Howells 2008-11-14 2378 atomic_dec(&p->cred->user->processes);
e0e817392b9acf David Howells 2009-09-02 2379 exit_creds(p);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2380 bad_fork_free:
405c0759712f57 Andy Lutomirski 2016-10-31 2381 p->state = TASK_DEAD;
68f24b08ee892d Andy Lutomirski 2016-09-15 2382 put_task_stack(p);
c3f3ce049f7d97 Andrea Arcangeli 2019-05-14 2383 delayed_free_task(p);
fe7d37d1fbf8ff Oleg Nesterov 2006-01-08 2384 fork_out:
c3ad2c3b02e953 Eric W. Biederman 2018-07-23 2385 spin_lock_irq(¤t->sighand->siglock);
c3ad2c3b02e953 Eric W. Biederman 2018-07-23 2386 hlist_del_init(&delayed.node);
c3ad2c3b02e953 Eric W. Biederman 2018-07-23 2387 spin_unlock_irq(¤t->sighand->siglock);
fe7d37d1fbf8ff Oleg Nesterov 2006-01-08 @2388 return ERR_PTR(retval);
^1da177e4c3f41 Linus Torvalds 2005-04-16 2389 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 2390
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
Re: [PATCH 1/2] Bluetooth: Add initial implementation of CIS connections
by Dan Carpenter
Hi Luiz,
url: https://github.com/0day-ci/linux/commits/Luiz-Augusto-von-Dentz/Bluetooth...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
net/bluetooth/hci_event.c:3188 hci_cc_le_set_cig_params() warn: inconsistent returns 'hdev->lock'.
Old smatch warnings:
net/bluetooth/hci_event.c:5567 hci_le_adv_report_evt() warn: potential spectre issue 'ev->data' [r] (local cap)
net/bluetooth/hci_event.c:5569 hci_le_adv_report_evt() warn: possible spectre second half. 'rssi'
# https://github.com/0day-ci/linux/commit/88d6b37aa7d732b2392e953206c323156...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 88d6b37aa7d732b2392e953206c3231560035c3c
vim +3188 net/bluetooth/hci_event.c
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3150 static void hci_cc_le_set_cig_params(struct hci_dev *hdev, struct sk_buff *skb)
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3151 {
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3152 struct hci_rp_le_set_cig_params *rp = (void *) skb->data;
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3153 struct hci_conn *conn;
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3154 int i = 0;
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3155
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3156 BT_DBG("%s status 0x%2.2x", hdev->name, rp->status);
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3157
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3158 hci_dev_lock(hdev);
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3159
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3160 rcu_read_lock();
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3161
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3162 list_for_each_entry_rcu(conn, &hdev->conn_hash.list, list) {
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3163 if (conn->type != ISO_LINK || conn->handle ||
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3164 conn->state == BT_CONNECTED)
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3165 continue;
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3166
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3167 if (rp->status) {
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3168 conn->state = BT_CLOSED;
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3169 hci_connect_cfm(conn, rp->status);
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3170 hci_conn_del(conn);
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3171 return;
^^^^^^^
goto unlock
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3172 }
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3173
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3174 conn->handle = __le16_to_cpu(rp->handle[i++]);
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3175
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3176 BT_DBG("%p handle 0x%4.4x", conn, conn->handle);
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3177
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3178 /* Create CIS if LE is already connected */
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3179 if (conn->link->state == BT_CONNECTED)
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3180 hci_le_create_cis(conn->link);
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3181
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3182 if (i == rp->num_handles)
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3183 break;
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3184 }
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3185
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3186 rcu_read_unlock();
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3187
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 @3188 hci_dev_unlock(hdev);
88d6b37aa7d732 Luiz Augusto von Dentz 2020-01-16 3189 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
Re: [PATCH] mm: Add MREMAP_DONTUNMAP to mremap().
by Dan Carpenter
Hi Brian,
url: https://github.com/0day-ci/linux/commits/Brian-Geffon/mm-Add-MREMAP_DONTU...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 4703d9119972bf586d2cca76ec6438f819ffa30e
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
mm/mremap.c:561 mremap_to() error: potentially dereferencing uninitialized 'vma'.
# https://github.com/0day-ci/linux/commit/98663ca05501623c3da7f0f30be8ba7d6...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 98663ca05501623c3da7f0f30be8ba7d632cf010
vim +/vma +561 mm/mremap.c
81909b842107ef Michel Lespinasse 2013-02-22 506 static unsigned long mremap_to(unsigned long addr, unsigned long old_len,
72f87654c69690 Pavel Emelyanov 2017-02-22 507 unsigned long new_addr, unsigned long new_len, bool *locked,
98663ca0550162 Brian Geffon 2020-01-22 508 unsigned long flags, struct vm_userfaultfd_ctx *uf,
b22823719302e8 Mike Rapoport 2017-08-02 509 struct list_head *uf_unmap_early,
897ab3e0c49e24 Mike Rapoport 2017-02-24 510 struct list_head *uf_unmap)
ecc1a8993751de Al Viro 2009-11-24 511 {
ecc1a8993751de Al Viro 2009-11-24 512 struct mm_struct *mm = current->mm;
ecc1a8993751de Al Viro 2009-11-24 513 struct vm_area_struct *vma;
ecc1a8993751de Al Viro 2009-11-24 514 unsigned long ret = -EINVAL;
ecc1a8993751de Al Viro 2009-11-24 515 unsigned long charged = 0;
097eed103862f9 Al Viro 2009-11-24 516 unsigned long map_flags;
ecc1a8993751de Al Viro 2009-11-24 517
f19cb115a25f3f Alexander Kuleshov 2015-11-05 518 if (offset_in_page(new_addr))
ecc1a8993751de Al Viro 2009-11-24 519 goto out;
ecc1a8993751de Al Viro 2009-11-24 520
ecc1a8993751de Al Viro 2009-11-24 521 if (new_len > TASK_SIZE || new_addr > TASK_SIZE - new_len)
ecc1a8993751de Al Viro 2009-11-24 522 goto out;
ecc1a8993751de Al Viro 2009-11-24 523
9943242ca46814 Oleg Nesterov 2015-09-04 524 /* Ensure the old/new locations do not overlap */
9943242ca46814 Oleg Nesterov 2015-09-04 525 if (addr + old_len > new_addr && new_addr + new_len > addr)
ecc1a8993751de Al Viro 2009-11-24 526 goto out;
ecc1a8993751de Al Viro 2009-11-24 527
ea2c3f6f554561 Oscar Salvador 2019-03-05 528 /*
ea2c3f6f554561 Oscar Salvador 2019-03-05 529 * move_vma() need us to stay 4 maps below the threshold, otherwise
ea2c3f6f554561 Oscar Salvador 2019-03-05 530 * it will bail out at the very beginning.
ea2c3f6f554561 Oscar Salvador 2019-03-05 531 * That is a problem if we have already unmaped the regions here
ea2c3f6f554561 Oscar Salvador 2019-03-05 532 * (new_addr, and old_addr), because userspace will not know the
ea2c3f6f554561 Oscar Salvador 2019-03-05 533 * state of the vma's after it gets -ENOMEM.
ea2c3f6f554561 Oscar Salvador 2019-03-05 534 * So, to avoid such scenario we can pre-compute if the whole
ea2c3f6f554561 Oscar Salvador 2019-03-05 535 * operation has high chances to success map-wise.
ea2c3f6f554561 Oscar Salvador 2019-03-05 536 * Worst-scenario case is when both vma's (new_addr and old_addr) get
ea2c3f6f554561 Oscar Salvador 2019-03-05 537 * split in 3 before unmaping it.
ea2c3f6f554561 Oscar Salvador 2019-03-05 538 * That means 2 more maps (1 for each) to the ones we already hold.
ea2c3f6f554561 Oscar Salvador 2019-03-05 539 * Check whether current map count plus 2 still leads us to 4 maps below
ea2c3f6f554561 Oscar Salvador 2019-03-05 540 * the threshold, otherwise return -ENOMEM here to be more safe.
ea2c3f6f554561 Oscar Salvador 2019-03-05 541 */
ea2c3f6f554561 Oscar Salvador 2019-03-05 542 if ((mm->map_count + 2) >= sysctl_max_map_count - 3)
ea2c3f6f554561 Oscar Salvador 2019-03-05 543 return -ENOMEM;
ea2c3f6f554561 Oscar Salvador 2019-03-05 544
b22823719302e8 Mike Rapoport 2017-08-02 545 ret = do_munmap(mm, new_addr, new_len, uf_unmap_early);
ecc1a8993751de Al Viro 2009-11-24 546 if (ret)
ecc1a8993751de Al Viro 2009-11-24 547 goto out;
ecc1a8993751de Al Viro 2009-11-24 548
ecc1a8993751de Al Viro 2009-11-24 549 if (old_len >= new_len) {
897ab3e0c49e24 Mike Rapoport 2017-02-24 550 ret = do_munmap(mm, addr+new_len, old_len - new_len, uf_unmap);
ecc1a8993751de Al Viro 2009-11-24 551 if (ret && old_len != new_len)
ecc1a8993751de Al Viro 2009-11-24 552 goto out;
ecc1a8993751de Al Viro 2009-11-24 553 old_len = new_len;
ecc1a8993751de Al Viro 2009-11-24 554 }
ecc1a8993751de Al Viro 2009-11-24 555
98663ca0550162 Brian Geffon 2020-01-22 556 /*
98663ca0550162 Brian Geffon 2020-01-22 557 * MREMAP_DONTUNMAP expands by old_len + (new_len - old_len), we will
98663ca0550162 Brian Geffon 2020-01-22 558 * check that we can expand by old_len and vma_to_resize will handle
98663ca0550162 Brian Geffon 2020-01-22 559 * the vma growing.
98663ca0550162 Brian Geffon 2020-01-22 560 */
98663ca0550162 Brian Geffon 2020-01-22 @561 if (unlikely(flags & MREMAP_DONTUNMAP && !may_expand_vm(mm,
98663ca0550162 Brian Geffon 2020-01-22 562 vma->vm_flags, old_len >> PAGE_SHIFT))) {
^^^^^^^^^^^^^
98663ca0550162 Brian Geffon 2020-01-22 563 ret = -ENOMEM;
98663ca0550162 Brian Geffon 2020-01-22 564 goto out;
98663ca0550162 Brian Geffon 2020-01-22 565 }
98663ca0550162 Brian Geffon 2020-01-22 566
ecc1a8993751de Al Viro 2009-11-24 567 vma = vma_to_resize(addr, old_len, new_len, &charged);
^^^^^^^^^^^^^^^^^^^^
ecc1a8993751de Al Viro 2009-11-24 568 if (IS_ERR(vma)) {
ecc1a8993751de Al Viro 2009-11-24 569 ret = PTR_ERR(vma);
ecc1a8993751de Al Viro 2009-11-24 570 goto out;
ecc1a8993751de Al Viro 2009-11-24 571 }
ecc1a8993751de Al Viro 2009-11-24 572
097eed103862f9 Al Viro 2009-11-24 573 map_flags = MAP_FIXED;
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[brauner:pidfd_capabilities 6/7] kernel/fork.c:2743 clone3_args_valid() warn: signedness bug returning '(-22)'
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git pidfd_capabilities
head: 39f8e5a5a89ad52ff07fd5af7e514def2b527ed5
commit: aac4bbd536549cbb7440326d09a35ddf9c28f50b [6/7] pidfd: introduce caps
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
kernel/fork.c:2743 clone3_args_valid() warn: signedness bug returning '(-22)'
kernel/pid.c:621 __pidfd_fget() error: uninitialized symbol 'oldcred'.
# https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git/commit/...
git remote add brauner https://git.kernel.org/pub/scm/linux/kernel/git/brauner/linux.git
git remote update brauner
git checkout aac4bbd536549cbb7440326d09a35ddf9c28f50b
vim +2743 kernel/fork.c
fa729c4df55893 Christian Brauner 2019-10-31 2721 static bool clone3_args_valid(struct kernel_clone_args *kargs)
^^^^
7f192e3cd316ba Christian Brauner 2019-05-25 2722 {
b612e5df4587c9 Christian Brauner 2019-10-14 2723 /* Verify that no unknown flags are passed along. */
b612e5df4587c9 Christian Brauner 2019-10-14 2724 if (kargs->flags & ~(CLONE_LEGACY_FLAGS | CLONE_CLEAR_SIGHAND))
7f192e3cd316ba Christian Brauner 2019-05-25 2725 return false;
7f192e3cd316ba Christian Brauner 2019-05-25 2726
7f192e3cd316ba Christian Brauner 2019-05-25 2727 /*
7f192e3cd316ba Christian Brauner 2019-05-25 2728 * - make the CLONE_DETACHED bit reuseable for clone3
7f192e3cd316ba Christian Brauner 2019-05-25 2729 * - make the CSIGNAL bits reuseable for clone3
7f192e3cd316ba Christian Brauner 2019-05-25 2730 */
7f192e3cd316ba Christian Brauner 2019-05-25 2731 if (kargs->flags & (CLONE_DETACHED | CSIGNAL))
7f192e3cd316ba Christian Brauner 2019-05-25 2732 return false;
7f192e3cd316ba Christian Brauner 2019-05-25 2733
b612e5df4587c9 Christian Brauner 2019-10-14 2734 if ((kargs->flags & (CLONE_SIGHAND | CLONE_CLEAR_SIGHAND)) ==
b612e5df4587c9 Christian Brauner 2019-10-14 2735 (CLONE_SIGHAND | CLONE_CLEAR_SIGHAND))
b612e5df4587c9 Christian Brauner 2019-10-14 2736 return false;
b612e5df4587c9 Christian Brauner 2019-10-14 2737
7f192e3cd316ba Christian Brauner 2019-05-25 2738 if ((kargs->flags & (CLONE_THREAD | CLONE_PARENT)) &&
7f192e3cd316ba Christian Brauner 2019-05-25 2739 kargs->exit_signal)
7f192e3cd316ba Christian Brauner 2019-05-25 2740 return false;
7f192e3cd316ba Christian Brauner 2019-05-25 2741
aac4bbd536549c Christian Brauner 2020-01-19 2742 if (kargs->pidfd_flags & ~PIDFD_CAP_GETFD)
aac4bbd536549c Christian Brauner 2020-01-19 @2743 return -EINVAL;
^^^^^^^^^^^^^^
aac4bbd536549c Christian Brauner 2020-01-19 2744
aac4bbd536549c Christian Brauner 2020-01-19 2745 if ((kargs->pidfd_flags & PIDFD_CAP_GETFD) &&
aac4bbd536549c Christian Brauner 2020-01-19 2746 !ns_capable(current_user_ns(), CAP_SYS_PTRACE))
aac4bbd536549c Christian Brauner 2020-01-19 2747 return -EPERM;
^^^^^^^^^^^^^
This will return true which has security implications.
aac4bbd536549c Christian Brauner 2020-01-19 2748
fa729c4df55893 Christian Brauner 2019-10-31 2749 if (!clone3_stack_valid(kargs))
fa729c4df55893 Christian Brauner 2019-10-31 2750 return false;
fa729c4df55893 Christian Brauner 2019-10-31 2751
7f192e3cd316ba Christian Brauner 2019-05-25 2752 return true;
7f192e3cd316ba Christian Brauner 2019-05-25 2753 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
Re: [PATCH 1/4] staging: wilc1000: remove use of infinite loop conditions
by Dan Carpenter
Hey Ajay,
url: https://github.com/0day-ci/linux/commits/Ajay-Kathat-microchip-com/stagin...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 270f104ba26f0498aff85e5b002e2f4c2249c04b
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/staging/wilc1000/wlan.c:663 wilc_wlan_handle_txq() error: double unlocked 'wilc->hif_cs' (orig line 575)
# https://github.com/0day-ci/linux/commit/afb35a84bfc18d51ed5ffebd87d7f4cf0...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout afb35a84bfc18d51ed5ffebd87d7f4cf07c3b44e
vim +663 drivers/staging/wilc1000/wlan.c
a41047962ac053 drivers/staging/wilc1000/wilc_wlan.c Chris Park 2016-02-04 528 if (i == 0)
891256180aea96 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 529 goto out;
ac087c82c4ec08 drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 530 vmm_table[i] = 0x0;
a41047962ac053 drivers/staging/wilc1000/wilc_wlan.c Chris Park 2016-02-04 531
b997b84ffca6ab drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-11-12 532 acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
Acquire here.
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 533 counter = 0;
f782497c099102 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-16 534 func = wilc->hif_func;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 535 do {
f782497c099102 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-16 536 ret = func->hif_read_reg(wilc, WILC_HOST_TX_CTRL, ®);
133b22d694c7a4 drivers/staging/wilc1000/wilc_wlan.c Chris Park 2016-02-04 537 if (!ret)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 538 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 539
4ee4b9da2b0142 drivers/staging/wilc1000/wilc_wlan.c Elizabeth Ferdman 2016-09-30 540 if ((reg & 0x1) == 0)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 541 break;
4ee4b9da2b0142 drivers/staging/wilc1000/wilc_wlan.c Elizabeth Ferdman 2016-09-30 542
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 543 counter++;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 544 if (counter > 200) {
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 545 counter = 0;
891256180aea96 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 546 ret = func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, 0);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 547 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 548 }
67e2a07ed8008b drivers/staging/wilc1000/wilc_wlan.c Glen Lee 2015-12-21 549 } while (!wilc->quit);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 550
39823a50ff371c drivers/staging/wilc1000/wilc_wlan.c Alison Schofield 2015-10-08 551 if (!ret)
588bf3c1162604 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 552 goto out_release_bus;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 553
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 554 timeout = 200;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 555 do {
f782497c099102 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-16 556 ret = func->hif_block_tx(wilc,
f782497c099102 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-16 557 WILC_VMM_TBL_RX_SHADOW_BASE,
f782497c099102 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-16 558 (u8 *)vmm_table,
f782497c099102 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-16 559 ((i + 1) * 4));
133b22d694c7a4 drivers/staging/wilc1000/wilc_wlan.c Chris Park 2016-02-04 560 if (!ret)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 561 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 562
f782497c099102 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-16 563 ret = func->hif_write_reg(wilc, WILC_HOST_VMM_CTL, 0x2);
133b22d694c7a4 drivers/staging/wilc1000/wilc_wlan.c Chris Park 2016-02-04 564 if (!ret)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 565 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 566
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 567 do {
891256180aea96 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 568 ret = func->hif_read_reg(wilc, WILC_HOST_VMM_CTL, ®);
133b22d694c7a4 drivers/staging/wilc1000/wilc_wlan.c Chris Park 2016-02-04 569 if (!ret)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 570 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 571 if ((reg >> 2) & 0x1) {
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 572 entries = ((reg >> 3) & 0x3f);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 573 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 574 }
b997b84ffca6ab drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-11-12 @575 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
^^^^^^^^^^^
Bus is released here.
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 576 } while (--timeout);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 577 if (timeout <= 0) {
891256180aea96 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 578 ret = func->hif_write_reg(wilc, WILC_HOST_VMM_CTL, 0x0);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 579 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 580 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 581
39823a50ff371c drivers/staging/wilc1000/wilc_wlan.c Alison Schofield 2015-10-08 582 if (!ret)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 583 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 584
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 585 if (entries == 0) {
891256180aea96 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 586 ret = func->hif_read_reg(wilc, WILC_HOST_TX_CTRL, ®);
133b22d694c7a4 drivers/staging/wilc1000/wilc_wlan.c Chris Park 2016-02-04 587 if (!ret)
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 588 break;
ffda203c0cf3b5 drivers/staging/wilc1000/wilc_wlan.c Anish Bhatt 2015-09-29 589 reg &= ~BIT(0);
891256180aea96 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 590 ret = func->hif_write_reg(wilc, WILC_HOST_TX_CTRL, reg);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 591 }
afb35a84bfc18d drivers/staging/wilc1000/wlan.c Ajay Singh 2020-01-17 592 } while (0);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 593
39823a50ff371c drivers/staging/wilc1000/wilc_wlan.c Alison Schofield 2015-10-08 594 if (!ret)
588bf3c1162604 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 595 goto out_release_bus;
^^^^^^^^^^^^^^^^^^^^
39823a50ff371c drivers/staging/wilc1000/wilc_wlan.c Alison Schofield 2015-10-08 596
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 597 if (entries == 0) {
68b4f745cf1963 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-11-12 598 ret = -ENOBUFS;
588bf3c1162604 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 599 goto out_release_bus;
^^^^^^^^^^^^^^^^^^^^
Released again in these gotos.
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 600 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 601
b997b84ffca6ab drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-11-12 602 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 603
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 604 offset = 0;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 605 i = 0;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 606 do {
fbc2fe16afa3f3 drivers/staging/wilc1000/wilc_wlan.c Chaehyun Lim 2015-09-15 607 u32 header, buffer_offset;
82059dcec99e50 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 608 char *bssid;
82059dcec99e50 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 609
82059dcec99e50 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 610 tqe = wilc_wlan_txq_remove_from_head(dev);
82059dcec99e50 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 611 if (!tqe)
82059dcec99e50 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 612 break;
82059dcec99e50 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 613
9bc061e8805487 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2019-06-26 614 vif = tqe->vif;
82059dcec99e50 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 615 if (vmm_table[i] == 0)
82059dcec99e50 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 616 break;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 617
02211edc9a1f71 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-08-01 618 le32_to_cpus(&vmm_table[i]);
ac087c82c4ec08 drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 619 vmm_sz = (vmm_table[i] & 0x3ff);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 620 vmm_sz *= 4;
ab12d8c773f86c drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 621 header = (tqe->type << 31) |
ab12d8c773f86c drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 622 (tqe->buffer_size << 15) |
ab12d8c773f86c drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 623 vmm_sz;
78174adaf59e85 drivers/staging/wilc1000/wilc_wlan.c Chandra S Gorentla 2015-08-08 624 if (tqe->type == WILC_MGMT_PKT)
ffda203c0cf3b5 drivers/staging/wilc1000/wilc_wlan.c Anish Bhatt 2015-09-29 625 header |= BIT(30);
78174adaf59e85 drivers/staging/wilc1000/wilc_wlan.c Chandra S Gorentla 2015-08-08 626 else
ffda203c0cf3b5 drivers/staging/wilc1000/wilc_wlan.c Anish Bhatt 2015-09-29 627 header &= ~BIT(30);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 628
02211edc9a1f71 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-08-01 629 cpu_to_le32s(&header);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 630 memcpy(&txb[offset], &header, 4);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 631 if (tqe->type == WILC_CFG_PKT) {
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 632 buffer_offset = ETH_CONFIG_PKT_HDR_OFFSET;
590c0a39650f02 drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 633 } else if (tqe->type == WILC_NET_PKT) {
9bc061e8805487 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2019-06-26 634 bssid = tqe->vif->bssid;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 635 buffer_offset = ETH_ETHERNET_HDR_OFFSET;
1bbf6a6d4091af drivers/staging/wilc1000/wilc_wlan.c Aditya Shankar 2017-11-03 636 memcpy(&txb[offset + 8], bssid, 6);
590c0a39650f02 drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 637 } else {
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 638 buffer_offset = HOST_HDR_OFFSET;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 639 }
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 640
ab12d8c773f86c drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 641 memcpy(&txb[offset + buffer_offset],
ab12d8c773f86c drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 642 tqe->buffer, tqe->buffer_size);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 643 offset += vmm_sz;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 644 i++;
ac087c82c4ec08 drivers/staging/wilc1000/wilc_wlan.c Leo Kim 2015-11-06 645 tqe->status = 1;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 646 if (tqe->tx_complete_func)
82059dcec99e50 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 647 tqe->tx_complete_func(tqe->priv, tqe->status);
f31e5584dc555f drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-09-04 648 if (tqe->ack_idx != NOT_TCP_ACK &&
f31e5584dc555f drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-09-04 649 tqe->ack_idx < MAX_PENDING_ACKS)
f31e5584dc555f drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-09-04 650 vif->ack_filter.pending_acks[tqe->ack_idx].txqe = NULL;
a18dd63047a86e drivers/staging/wilc1000/wilc_wlan.c Greg Kroah-Hartman 2015-09-03 651 kfree(tqe);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 652 } while (--entries);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 653
b997b84ffca6ab drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-11-12 654 acquire_bus(wilc, WILC_BUS_ACQUIRE_AND_WAKEUP);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 655
f782497c099102 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-16 656 ret = func->hif_clear_int_ext(wilc, ENABLE_TX_VMM);
133b22d694c7a4 drivers/staging/wilc1000/wilc_wlan.c Chris Park 2016-02-04 657 if (!ret)
588bf3c1162604 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 658 goto out_release_bus;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 659
f782497c099102 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-16 660 ret = func->hif_block_tx_ext(wilc, 0, txb, offset);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 661
588bf3c1162604 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 662 out_release_bus:
b997b84ffca6ab drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-11-12 @663 release_bus(wilc, WILC_BUS_RELEASE_ALLOW_SLEEP);
891256180aea96 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 664
891256180aea96 drivers/staging/wilc1000/wilc_wlan.c Ajay Singh 2018-02-26 665 out:
334bed089d3d74 drivers/staging/wilc1000/wilc_wlan.c Binoy Jayan 2016-06-15 666 mutex_unlock(&wilc->txq_add_to_head_cs);
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 667
67e2a07ed8008b drivers/staging/wilc1000/wilc_wlan.c Glen Lee 2015-12-21 668 *txq_count = wilc->txq_entries;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 669 return ret;
c5c77ba18ea66a drivers/staging/wilc1000/wilc_wlan.c Johnny Kim 2015-05-11 670 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
[morimoto-linux:fw-cleanup-2020-01-10-v3 94/416] sound/soc/soc-pcm.c:951 soc_pcm_hw_free() warn: inconsistent returns 'rtd->card->pcm_mutex'.
by Dan Carpenter
tree: https://github.com/morimoto/linux fw-cleanup-2020-01-10-v3
head: 109289147a86ef6391233055b9c74e475deaee0e
commit: 4d2384aa3e976e7fd983461a0ef97c9bb6c855b9 [94/416] ASoC: soc-pcm: remove soc_pcm_components_hw_free()
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
sound/soc/soc-pcm.c:951 soc_pcm_hw_free() warn: inconsistent returns 'rtd->card->pcm_mutex'.
# https://github.com/morimoto/linux/commit/4d2384aa3e976e7fd983461a0ef97c9b...
git remote add morimoto-linux https://github.com/morimoto/linux
git remote update morimoto-linux
git checkout 4d2384aa3e976e7fd983461a0ef97c9bb6c855b9
vim +951 sound/soc/soc-pcm.c
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 913 static int soc_pcm_hw_free(struct snd_pcm_substream *substream)
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 914 {
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 915 struct snd_soc_pcm_runtime *rtd = substream->private_data;
4d2384aa3e976e Kuninori Morimoto 2019-07-24 916 struct snd_soc_component *component;
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 917 struct snd_soc_dai *dai;
4d2384aa3e976e Kuninori Morimoto 2019-07-24 918 int i, ret;
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 919
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 920 mutex_lock_nested(&rtd->card->pcm_mutex, rtd->card->pcm_subclass);
^^^^^^^^^^^^^^^^^
Lock
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 921
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 922 /* clear the corresponding DAIs parameters when going to be inactive */
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 923 for_each_rtd_dais(rtd, i, dai) {
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 924 if (dai->active == 1) {
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 925 dai->rate = 0;
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 926 dai->channels = 0;
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 927 dai->sample_bits = 0;
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 928 snd_soc_dai_digital_mute(dai, 1, substream->stream);
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 929 }
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 930 }
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 931
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 932 /* free any machine hw params */
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 933 soc_rtd_hw_free(rtd, substream);
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 934
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 935 /* free any component resources */
4d2384aa3e976e Kuninori Morimoto 2019-07-24 936 ret = 0;
4d2384aa3e976e Kuninori Morimoto 2019-07-24 937 for_each_rtd_components(rtd, i, component)
4d2384aa3e976e Kuninori Morimoto 2019-07-24 938 ret |= snd_soc_component_hw_free(component, substream);
4d2384aa3e976e Kuninori Morimoto 2019-07-24 939 if (ret < 0)
4d2384aa3e976e Kuninori Morimoto 2019-07-24 940 return ret;
^^^^^^^^^^
Missing unlock
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 941
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 942 /* now free hw params for the DAIs */
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 943 for_each_rtd_dais(rtd, i, dai) {
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 944 if (!snd_soc_dai_stream_valid(dai, substream->stream))
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 945 continue;
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 946
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 947 snd_soc_dai_hw_free(dai, substream);
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 948 }
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 949
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 950 mutex_unlock(&rtd->card->pcm_mutex);
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 @951 return 0;
53d7e3a8e5b89d Kuninori Morimoto 2019-10-02 952 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
Re: [PATCH net 4/5] netdevsim: use IS_ERR instead of IS_ERR_OR_NULL for debugfs
by Dan Carpenter
Hi Taehee,
url: https://github.com/0day-ci/linux/commits/Taehee-Yoo/netdevsim-fix-a-sever...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net.git a5c3a7c0ce1a1cfab15404018933775d7222a517
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/netdevsim/bpf.c:246 nsim_bpf_create_prog() error: dereferencing freed memory 'state'
# https://github.com/0day-ci/linux/commit/923e31529b0b3f039f837f54c4a1bbd77...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 923e31529b0b3f039f837f54c4a1bbd77793256b
vim +/state +246 drivers/net/netdevsim/bpf.c
d514f41e793d2c Jiri Pirko 2019-04-25 227 static int nsim_bpf_create_prog(struct nsim_dev *nsim_dev,
b26b6946a62f37 Jiri Pirko 2019-04-12 228 struct bpf_prog *prog)
31d3ad832948c7 Jakub Kicinski 2017-12-01 229 {
31d3ad832948c7 Jakub Kicinski 2017-12-01 230 struct nsim_bpf_bound_prog *state;
31d3ad832948c7 Jakub Kicinski 2017-12-01 231 char name[16];
31d3ad832948c7 Jakub Kicinski 2017-12-01 232
31d3ad832948c7 Jakub Kicinski 2017-12-01 233 state = kzalloc(sizeof(*state), GFP_KERNEL);
31d3ad832948c7 Jakub Kicinski 2017-12-01 234 if (!state)
31d3ad832948c7 Jakub Kicinski 2017-12-01 235 return -ENOMEM;
31d3ad832948c7 Jakub Kicinski 2017-12-01 236
d514f41e793d2c Jiri Pirko 2019-04-25 237 state->nsim_dev = nsim_dev;
31d3ad832948c7 Jakub Kicinski 2017-12-01 238 state->prog = prog;
31d3ad832948c7 Jakub Kicinski 2017-12-01 239 state->state = "verify";
31d3ad832948c7 Jakub Kicinski 2017-12-01 240
31d3ad832948c7 Jakub Kicinski 2017-12-01 241 /* Program id is not populated yet when we create the state. */
d514f41e793d2c Jiri Pirko 2019-04-25 242 sprintf(name, "%u", nsim_dev->prog_id_gen++);
d514f41e793d2c Jiri Pirko 2019-04-25 243 state->ddir = debugfs_create_dir(name, nsim_dev->ddir_bpf_bound_progs);
923e31529b0b3f Taehee Yoo 2020-01-11 244 if (IS_ERR(state->ddir)) {
31d3ad832948c7 Jakub Kicinski 2017-12-01 245 kfree(state);
^^^^^
state is freed.
923e31529b0b3f Taehee Yoo 2020-01-11 @246 return PTR_ERR(state->ddir);
^^^^^^^^^^^
Then dereferenced afterward.
31d3ad832948c7 Jakub Kicinski 2017-12-01 247 }
31d3ad832948c7 Jakub Kicinski 2017-12-01 248
31d3ad832948c7 Jakub Kicinski 2017-12-01 249 debugfs_create_u32("id", 0400, state->ddir, &prog->aux->id);
31d3ad832948c7 Jakub Kicinski 2017-12-01 250 debugfs_create_file("state", 0400, state->ddir,
31d3ad832948c7 Jakub Kicinski 2017-12-01 251 &state->state, &nsim_bpf_string_fops);
31d3ad832948c7 Jakub Kicinski 2017-12-01 252 debugfs_create_bool("loaded", 0400, state->ddir, &state->is_loaded);
31d3ad832948c7 Jakub Kicinski 2017-12-01 253
d514f41e793d2c Jiri Pirko 2019-04-25 254 list_add_tail(&state->l, &nsim_dev->bpf_bound_progs);
31d3ad832948c7 Jakub Kicinski 2017-12-01 255
31d3ad832948c7 Jakub Kicinski 2017-12-01 256 prog->aux->offload->dev_priv = state;
31d3ad832948c7 Jakub Kicinski 2017-12-01 257
31d3ad832948c7 Jakub Kicinski 2017-12-01 258 return 0;
31d3ad832948c7 Jakub Kicinski 2017-12-01 259 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
Re: [PATCH 3/4] SFH: Transport Driver to add support of AMD sensor fusion Hub (SFH)
by Dan Carpenter
Hi Sandeep,
url: https://github.com/0day-ci/linux/commits/Sandeep-Singh/SFH-Add-Support-fo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git b07f636fca1c8fbba124b0082487c0b3890a0e0c
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/hid/amd-sfh-hid/amdsfh-hid-client.c:157 amd_sfh_hid_client_probe() warn: possible memory leak of 'cl_dev'
drivers/hid/amd-sfh-hid/amdsfh-hid-client.c:225 amd_sfh_hid_client_remove() warn: variable dereferenced before check 'cl_dev' (see line 218)
drivers/hid/amd-sfh-hid/amdsfh-hid-client.c:225 amd_sfh_hid_client_remove() warn: variable dereferenced before check 'cl_data' (see line 220)
drivers/hid/amd-sfh-hid/amdsfh-debugfs.c:42 amdsfh_debugfs_accel_read() warn: possible memory leak of 'obuf'
drivers/hid/amd-sfh-hid/amdsfh-debugfs.c:78 amdsfh_debugfs_gyro_read() warn: possible memory leak of 'obuf'
drivers/hid/amd-sfh-hid/amdsfh-debugfs.c:114 amdsfh_debugfs_mag_read() warn: possible memory leak of 'obuf'
drivers/hid/amd-sfh-hid/amdsfh-debugfs.c:150 amdsfh_debugfs_als_read() warn: possible memory leak of 'obuf'
# https://github.com/0day-ci/linux/commit/da2b6403065dd09f90ffdd06c25cbc139...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout da2b6403065dd09f90ffdd06c25cbc139acde2b8
vim +/cl_dev +157 drivers/hid/amd-sfh-hid/amdsfh-hid-client.c
da2b6403065dd0 Sandeep Singh 2020-01-09 140 static int amd_sfh_hid_client_probe(struct platform_device *pdev)
da2b6403065dd0 Sandeep Singh 2020-01-09 141 {
da2b6403065dd0 Sandeep Singh 2020-01-09 142 struct amd_mp2_sensor_info info;
da2b6403065dd0 Sandeep Singh 2020-01-09 143 int rc = 0;
da2b6403065dd0 Sandeep Singh 2020-01-09 144 int i;
da2b6403065dd0 Sandeep Singh 2020-01-09 145 struct amdtp_cl_device *cl_dev;
da2b6403065dd0 Sandeep Singh 2020-01-09 146 struct amdtp_cl_data *cl_data;
da2b6403065dd0 Sandeep Singh 2020-01-09 147 u32 feature_report_size = 0;
da2b6403065dd0 Sandeep Singh 2020-01-09 148 u32 input_report_size = 0;
da2b6403065dd0 Sandeep Singh 2020-01-09 149
da2b6403065dd0 Sandeep Singh 2020-01-09 150 cl_dev = kzalloc(sizeof(*cl_dev), GFP_KERNEL);
da2b6403065dd0 Sandeep Singh 2020-01-09 151 if (!cl_dev)
da2b6403065dd0 Sandeep Singh 2020-01-09 152 return -ENOMEM;
da2b6403065dd0 Sandeep Singh 2020-01-09 153
da2b6403065dd0 Sandeep Singh 2020-01-09 154 cl_dev->pdev = pci_get_device(PCI_VENDOR_ID_AMD,
da2b6403065dd0 Sandeep Singh 2020-01-09 155 PCI_DEVICE_ID_AMD_MP2, NULL);
da2b6403065dd0 Sandeep Singh 2020-01-09 156 if (!cl_dev->pdev)
da2b6403065dd0 Sandeep Singh 2020-01-09 @157 return -ENOMEM;
^^^^^^^^^^^^^^
You might want to consider using devm_kzalloc().
da2b6403065dd0 Sandeep Singh 2020-01-09 158
da2b6403065dd0 Sandeep Singh 2020-01-09 159 cl_data = kzalloc(sizeof(*cl_data), GFP_KERNEL);
da2b6403065dd0 Sandeep Singh 2020-01-09 160 cl_data->num_hid_devices = amd_mp2_get_sensor_num
da2b6403065dd0 Sandeep Singh 2020-01-09 161 (cl_dev->pdev, &cl_data->sensor_idx[0]);
da2b6403065dd0 Sandeep Singh 2020-01-09 162
da2b6403065dd0 Sandeep Singh 2020-01-09 163 INIT_DELAYED_WORK(&cl_data->work, amd_sfh_work);
da2b6403065dd0 Sandeep Singh 2020-01-09 164 INIT_DELAYED_WORK(&cl_data->work_buffer, amd_sfh_work_buffer);
da2b6403065dd0 Sandeep Singh 2020-01-09 165 INIT_LIST_HEAD(&req_list.list);
da2b6403065dd0 Sandeep Singh 2020-01-09 166
da2b6403065dd0 Sandeep Singh 2020-01-09 167 amdsfh_debugfs_setup(cl_data);
da2b6403065dd0 Sandeep Singh 2020-01-09 168
da2b6403065dd0 Sandeep Singh 2020-01-09 169 for (i = 0; i < cl_data->num_hid_devices; i++) {
da2b6403065dd0 Sandeep Singh 2020-01-09 170 cl_data->sensor_virt_addr[i] = dma_alloc_coherent
da2b6403065dd0 Sandeep Singh 2020-01-09 171 (&pdev->dev, sizeof(int) * 8,
da2b6403065dd0 Sandeep Singh 2020-01-09 172 &cl_data->sensor_phy_addr[i], GFP_KERNEL);
da2b6403065dd0 Sandeep Singh 2020-01-09 173 cl_data->sensor_sts[i] = 0;
da2b6403065dd0 Sandeep Singh 2020-01-09 174 cl_data->sensor_requested_cnt[i] = 0;
da2b6403065dd0 Sandeep Singh 2020-01-09 175 cl_data->cur_hid_dev = i;
da2b6403065dd0 Sandeep Singh 2020-01-09 176
da2b6403065dd0 Sandeep Singh 2020-01-09 177 cl_data->report_descr_size[i] = get_descriptor_size
da2b6403065dd0 Sandeep Singh 2020-01-09 178 (cl_data->sensor_idx[i], descr_size);
da2b6403065dd0 Sandeep Singh 2020-01-09 179
da2b6403065dd0 Sandeep Singh 2020-01-09 180 feature_report_size = get_descriptor_size
da2b6403065dd0 Sandeep Singh 2020-01-09 181 (cl_data->sensor_idx[i], feature_size);
da2b6403065dd0 Sandeep Singh 2020-01-09 182
da2b6403065dd0 Sandeep Singh 2020-01-09 183 input_report_size = get_descriptor_size
da2b6403065dd0 Sandeep Singh 2020-01-09 184 (cl_data->sensor_idx[i], input_size);
da2b6403065dd0 Sandeep Singh 2020-01-09 185
da2b6403065dd0 Sandeep Singh 2020-01-09 186 cl_data->feature_report[i] = kzalloc(feature_report_size,
da2b6403065dd0 Sandeep Singh 2020-01-09 187 GFP_KERNEL);
da2b6403065dd0 Sandeep Singh 2020-01-09 188 cl_data->input_report[i] = kzalloc(input_report_size,
da2b6403065dd0 Sandeep Singh 2020-01-09 189 GFP_KERNEL);
da2b6403065dd0 Sandeep Singh 2020-01-09 190 info.period = PERIOD;
da2b6403065dd0 Sandeep Singh 2020-01-09 191 info.sensor_idx = cl_data->sensor_idx[i];
da2b6403065dd0 Sandeep Singh 2020-01-09 192 info.phy_address = cl_data->sensor_phy_addr[i];
da2b6403065dd0 Sandeep Singh 2020-01-09 193 cl_data->report_descr[i] = kzalloc
da2b6403065dd0 Sandeep Singh 2020-01-09 194 (cl_data->report_descr_size[i], GFP_KERNEL);
da2b6403065dd0 Sandeep Singh 2020-01-09 195 if (!cl_data->report_descr[i])
da2b6403065dd0 Sandeep Singh 2020-01-09 196 return -ENOMEM;
da2b6403065dd0 Sandeep Singh 2020-01-09 197 rc = get_report_descriptor(cl_data->sensor_idx[i],
da2b6403065dd0 Sandeep Singh 2020-01-09 198 cl_data->report_descr[i]);
da2b6403065dd0 Sandeep Singh 2020-01-09 199 rc = amdtp_hid_probe(cl_data->cur_hid_dev, cl_data);
da2b6403065dd0 Sandeep Singh 2020-01-09 200 rc = amd_start_sensor(cl_dev->pdev, info);
da2b6403065dd0 Sandeep Singh 2020-01-09 201 cl_data->sensor_sts[i] = 1;
da2b6403065dd0 Sandeep Singh 2020-01-09 202 }
da2b6403065dd0 Sandeep Singh 2020-01-09 203
da2b6403065dd0 Sandeep Singh 2020-01-09 204 cl_dev->cl_data = cl_data;
da2b6403065dd0 Sandeep Singh 2020-01-09 205 cl_data_context = cl_data;
da2b6403065dd0 Sandeep Singh 2020-01-09 206 platform_set_drvdata(pdev, cl_dev);
da2b6403065dd0 Sandeep Singh 2020-01-09 207 schedule_delayed_work(&cl_data->work_buffer, PERIOD);
da2b6403065dd0 Sandeep Singh 2020-01-09 208 return 0;
da2b6403065dd0 Sandeep Singh 2020-01-09 209 }
da2b6403065dd0 Sandeep Singh 2020-01-09 210
da2b6403065dd0 Sandeep Singh 2020-01-09 211 static int amd_sfh_hid_client_remove(struct platform_device *pdev)
da2b6403065dd0 Sandeep Singh 2020-01-09 212 {
da2b6403065dd0 Sandeep Singh 2020-01-09 213 int i;
da2b6403065dd0 Sandeep Singh 2020-01-09 214 struct amdtp_cl_device *cl_dev;
da2b6403065dd0 Sandeep Singh 2020-01-09 215 struct amdtp_cl_data *cl_data;
da2b6403065dd0 Sandeep Singh 2020-01-09 216
da2b6403065dd0 Sandeep Singh 2020-01-09 217 cl_dev = platform_get_drvdata(pdev);
da2b6403065dd0 Sandeep Singh 2020-01-09 @218 cl_data = cl_dev->cl_data;
da2b6403065dd0 Sandeep Singh 2020-01-09 219
da2b6403065dd0 Sandeep Singh 2020-01-09 @220 for (i = 0; i < cl_data->num_hid_devices; i++)
da2b6403065dd0 Sandeep Singh 2020-01-09 221 amd_stop_sensor(cl_dev->pdev, i);
da2b6403065dd0 Sandeep Singh 2020-01-09 222 cancel_delayed_work_sync(&cl_data->work);
da2b6403065dd0 Sandeep Singh 2020-01-09 223 cancel_delayed_work_sync(&cl_data->work_buffer);
da2b6403065dd0 Sandeep Singh 2020-01-09 224 amdsfh_debugfs_destroy(cl_data);
da2b6403065dd0 Sandeep Singh 2020-01-09 @225 if (cl_dev && cl_data)
^^^^^^ ^^^^^^^
If these are NULL, it's too late.
da2b6403065dd0 Sandeep Singh 2020-01-09 226 amdtp_hid_remove(cl_data);
da2b6403065dd0 Sandeep Singh 2020-01-09 227
da2b6403065dd0 Sandeep Singh 2020-01-09 228 for (i = 0; i < cl_data->num_hid_devices; i++) {
da2b6403065dd0 Sandeep Singh 2020-01-09 229 if (cl_data->sensor_virt_addr[i])
da2b6403065dd0 Sandeep Singh 2020-01-09 230 dma_free_coherent(&pdev->dev, 8 * sizeof(int),
da2b6403065dd0 Sandeep Singh 2020-01-09 231 cl_data->sensor_virt_addr[i],
da2b6403065dd0 Sandeep Singh 2020-01-09 232 cl_data->sensor_phy_addr[i]);
da2b6403065dd0 Sandeep Singh 2020-01-09 233 }
da2b6403065dd0 Sandeep Singh 2020-01-09 234
da2b6403065dd0 Sandeep Singh 2020-01-09 235 kfree(cl_data);
da2b6403065dd0 Sandeep Singh 2020-01-09 236 pr_info("%s:%s Exit\n", DRIVER_NAME, __func__);
da2b6403065dd0 Sandeep Singh 2020-01-09 237 return 0;
da2b6403065dd0 Sandeep Singh 2020-01-09 238 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months
Re: [PATCH v27 12/12] LRNG - add power-on and runtime self-tests
by Dan Carpenter
Hi "Stephan,
url: https://github.com/0day-ci/linux/commits/Stephan-M-ller/dev-random-a-new-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc.git 68faa679b8be1a74e6663c21c3a9d25d32f1c079
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/char/lrng/lrng_selftest.c:117 lrng_pool_lfsr_selftest() warn: sizeof(NUMBER)?
drivers/char/lrng/lrng_selftest.c:229 lrng_hash_df_selftest() warn: sizeof(NUMBER)?
# https://github.com/0day-ci/linux/commit/5b6f2811172c968d8eb78167825c58557...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 5b6f2811172c968d8eb78167825c58557ea91995
vim +117 drivers/char/lrng/lrng_selftest.c
5b6f2811172c96 Stephan Müller 2020-01-09 89 static unsigned int lrng_pool_lfsr_selftest(void)
5b6f2811172c96 Stephan Müller 2020-01-09 90 {
5b6f2811172c96 Stephan Müller 2020-01-09 91 /*
5b6f2811172c96 Stephan Müller 2020-01-09 92 * First, 67th and last entry of entropy pool.
5b6f2811172c96 Stephan Müller 2020-01-09 93 *
5b6f2811172c96 Stephan Müller 2020-01-09 94 * The 67th entry is picked because this one is the first to receive
5b6f2811172c96 Stephan Müller 2020-01-09 95 * an entry. As we start with 1 to inject into the LFSR, the
5b6f2811172c96 Stephan Müller 2020-01-09 96 * 67th entry should be equal to rol(1, 7) >> 3 considering that
5b6f2811172c96 Stephan Müller 2020-01-09 97 * all other values of the LFSR are zero and the the twist value of 0
5b6f2811172c96 Stephan Müller 2020-01-09 98 * is applied.
5b6f2811172c96 Stephan Müller 2020-01-09 99 */
5b6f2811172c96 Stephan Müller 2020-01-09 100 static u32 const lrng_lfsr_selftest_result[][3] = {
5b6f2811172c96 Stephan Müller 2020-01-09 101 { 0xf56df24a, 0x00000010, 0x0e014939 },
5b6f2811172c96 Stephan Müller 2020-01-09 102 { 0x4b130726, 0x00000010, 0x2802f509 },
5b6f2811172c96 Stephan Müller 2020-01-09 103 { 0x87279152, 0x00000010, 0x00150000 },
5b6f2811172c96 Stephan Müller 2020-01-09 104 { 0x0b67f997, 0x00000010, 0x00150000 },
5b6f2811172c96 Stephan Müller 2020-01-09 105 { 0x4fea174f, 0x00000010, 0xcbf4a6ae },
5b6f2811172c96 Stephan Müller 2020-01-09 106 { 0x77149108, 0x00000010, 0x77bfadf2 },
5b6f2811172c96 Stephan Müller 2020-01-09 107 { 0x1e96037e, 0x00000010, 0x18017e79 },
5b6f2811172c96 Stephan Müller 2020-01-09 108 { 0xc84acef2, 0x00000010, 0x6345f7a8 },
5b6f2811172c96 Stephan Müller 2020-01-09 109 { 0x6a2eb6df, 0x00000010, 0x03950000 },
5b6f2811172c96 Stephan Müller 2020-01-09 110 };
5b6f2811172c96 Stephan Müller 2020-01-09 111 struct lrng_pool *lrng_pool, *lrng_pool_aligned;
5b6f2811172c96 Stephan Müller 2020-01-09 112 u32 i, ret = LRNG_SELFTEST_PASSED;
5b6f2811172c96 Stephan Müller 2020-01-09 113
5b6f2811172c96 Stephan Müller 2020-01-09 114 BUILD_BUG_ON(ARRAY_SIZE(lrng_lfsr_selftest_result) <
5b6f2811172c96 Stephan Müller 2020-01-09 115 CONFIG_LRNG_POOL_SIZE);
5b6f2811172c96 Stephan Müller 2020-01-09 116
5b6f2811172c96 Stephan Müller 2020-01-09 @117 lrng_pool = kzalloc(sizeof(struct lrng_pool) + sizeof(LRNG_KCAPI_ALIGN),
^^^^^^^^^^^^^^^^^^^^^^^^
Probably just LRNG_KCAPI_ALIGN is intended with no sizeof().
5b6f2811172c96 Stephan Müller 2020-01-09 118 GFP_KERNEL);
5b6f2811172c96 Stephan Müller 2020-01-09 119 if (!lrng_pool)
5b6f2811172c96 Stephan Müller 2020-01-09 120 return LRNG_SEFLTEST_ERROR_LFSR;
5b6f2811172c96 Stephan Müller 2020-01-09 121 lrng_pool_aligned = PTR_ALIGN(lrng_pool, sizeof(u32));
5b6f2811172c96 Stephan Müller 2020-01-09 122
5b6f2811172c96 Stephan Müller 2020-01-09 123 for (i = 1; i <= LRNG_POOL_SIZE; i++)
5b6f2811172c96 Stephan Müller 2020-01-09 124 _lrng_pool_lfsr_u32(lrng_pool_aligned, i);
5b6f2811172c96 Stephan Müller 2020-01-09 125
5b6f2811172c96 Stephan Müller 2020-01-09 126 if ((atomic_read_u32(&lrng_pool_aligned->pool[0]) !=
5b6f2811172c96 Stephan Müller 2020-01-09 127 lrng_lfsr_selftest_result[CONFIG_LRNG_POOL_SIZE][0]) ||
5b6f2811172c96 Stephan Müller 2020-01-09 128 (atomic_read_u32(&lrng_pool_aligned->pool[67 &
5b6f2811172c96 Stephan Müller 2020-01-09 129 (LRNG_POOL_SIZE - 1)]) !=
5b6f2811172c96 Stephan Müller 2020-01-09 130 lrng_lfsr_selftest_result[CONFIG_LRNG_POOL_SIZE][1]) ||
5b6f2811172c96 Stephan Müller 2020-01-09 131 (atomic_read_u32(&lrng_pool_aligned->pool[LRNG_POOL_SIZE - 1]) !=
5b6f2811172c96 Stephan Müller 2020-01-09 132 lrng_lfsr_selftest_result[CONFIG_LRNG_POOL_SIZE][2])) {
5b6f2811172c96 Stephan Müller 2020-01-09 133 pr_err("LRNG LFSR self-test FAILED\n");
5b6f2811172c96 Stephan Müller 2020-01-09 134 ret = LRNG_SEFLTEST_ERROR_LFSR;
5b6f2811172c96 Stephan Müller 2020-01-09 135 }
5b6f2811172c96 Stephan Müller 2020-01-09 136
5b6f2811172c96 Stephan Müller 2020-01-09 137 kfree(lrng_pool);
5b6f2811172c96 Stephan Müller 2020-01-09 138 return ret;
5b6f2811172c96 Stephan Müller 2020-01-09 139 }
5b6f2811172c96 Stephan Müller 2020-01-09 140
5b6f2811172c96 Stephan Müller 2020-01-09 141 /*
5b6f2811172c96 Stephan Müller 2020-01-09 142 * The test vectors are generated with the hash_df_testvector_generation tool
5b6f2811172c96 Stephan Müller 2020-01-09 143 * provided as part of the test tool set of the LRNG.
5b6f2811172c96 Stephan Müller 2020-01-09 144 */
5b6f2811172c96 Stephan Müller 2020-01-09 145 static unsigned int lrng_hash_df_selftest(void)
5b6f2811172c96 Stephan Müller 2020-01-09 146 {
5b6f2811172c96 Stephan Müller 2020-01-09 147 const struct lrng_crypto_cb *crypto_cb = &lrng_cc20_crypto_cb;
5b6f2811172c96 Stephan Müller 2020-01-09 148
5b6f2811172c96 Stephan Müller 2020-01-09 149 /*
5b6f2811172c96 Stephan Müller 2020-01-09 150 * The size of 45 bytes is chosen arbitrarily. Yet, this size should
5b6f2811172c96 Stephan Müller 2020-01-09 151 * ensure that we have at least two hash blocks plus some fraction
5b6f2811172c96 Stephan Müller 2020-01-09 152 * of a hash block generated.
5b6f2811172c96 Stephan Müller 2020-01-09 153 */
5b6f2811172c96 Stephan Müller 2020-01-09 154 static u8 const lrng_hash_df_selftest_result[][45] = {
5b6f2811172c96 Stephan Müller 2020-01-09 155 {
5b6f2811172c96 Stephan Müller 2020-01-09 156 0x3b, 0xbe, 0x7a, 0xbd, 0x2b, 0x16, 0x02, 0x4c,
5b6f2811172c96 Stephan Müller 2020-01-09 157 0xfc, 0xd3, 0x02, 0x15, 0xf0, 0x86, 0xd4, 0xdb,
5b6f2811172c96 Stephan Müller 2020-01-09 158 0x49, 0xec, 0x26, 0x53, 0xd6, 0xc9, 0x6d, 0xad,
5b6f2811172c96 Stephan Müller 2020-01-09 159 0x24, 0xca, 0x72, 0x89, 0x2c, 0xfa, 0x48, 0x18,
5b6f2811172c96 Stephan Müller 2020-01-09 160 0xf7, 0x47, 0xb5, 0x2f, 0x92, 0xa2, 0x1b, 0xd9,
5b6f2811172c96 Stephan Müller 2020-01-09 161 0x24, 0xa7, 0x2f, 0xa2, 0x0b,
5b6f2811172c96 Stephan Müller 2020-01-09 162 }, {
5b6f2811172c96 Stephan Müller 2020-01-09 163 0xd2, 0xaa, 0xf9, 0x76, 0x26, 0xc6, 0x13, 0xea,
5b6f2811172c96 Stephan Müller 2020-01-09 164 0xb8, 0xde, 0xe6, 0x88, 0x8f, 0xc4, 0x7a, 0x7d,
5b6f2811172c96 Stephan Müller 2020-01-09 165 0x9c, 0xb4, 0x1b, 0xd1, 0xd1, 0x8a, 0x40, 0xc9,
5b6f2811172c96 Stephan Müller 2020-01-09 166 0xaa, 0x45, 0xa6, 0xb6, 0xb5, 0x6f, 0xf6, 0xbc,
5b6f2811172c96 Stephan Müller 2020-01-09 167 0xbb, 0x77, 0x37, 0xbc, 0x5a, 0x2d, 0xcc, 0x84,
5b6f2811172c96 Stephan Müller 2020-01-09 168 0x25, 0x68, 0x5e, 0xba, 0x16,
5b6f2811172c96 Stephan Müller 2020-01-09 169 }, {
5b6f2811172c96 Stephan Müller 2020-01-09 170 0x58, 0x66, 0x82, 0x88, 0x29, 0x19, 0xa4, 0xbb,
5b6f2811172c96 Stephan Müller 2020-01-09 171 0x33, 0x42, 0xc9, 0x72, 0x0d, 0x68, 0x6e, 0xb9,
5b6f2811172c96 Stephan Müller 2020-01-09 172 0xc6, 0xe0, 0x7a, 0xf9, 0x20, 0xca, 0x6d, 0x18,
5b6f2811172c96 Stephan Müller 2020-01-09 173 0x35, 0xec, 0xfa, 0x9e, 0xf6, 0x3a, 0xa7, 0xb6,
5b6f2811172c96 Stephan Müller 2020-01-09 174 0x92, 0x7a, 0xe5, 0xcd, 0xc5, 0x13, 0x9f, 0x65,
5b6f2811172c96 Stephan Müller 2020-01-09 175 0x6a, 0xe1, 0xe4, 0x3f, 0xb9,
5b6f2811172c96 Stephan Müller 2020-01-09 176 }, {
5b6f2811172c96 Stephan Müller 2020-01-09 177 0xdd, 0xf1, 0x34, 0xca, 0x08, 0xe3, 0xce, 0x8a,
5b6f2811172c96 Stephan Müller 2020-01-09 178 0x26, 0x6b, 0xce, 0x99, 0x8a, 0x84, 0xd2, 0x21,
5b6f2811172c96 Stephan Müller 2020-01-09 179 0x98, 0x10, 0x95, 0x5f, 0x9f, 0xc3, 0xf2, 0xe4,
5b6f2811172c96 Stephan Müller 2020-01-09 180 0x79, 0x75, 0xb5, 0x15, 0xa7, 0xa2, 0xf1, 0xc4,
5b6f2811172c96 Stephan Müller 2020-01-09 181 0xdc, 0x67, 0xcb, 0x67, 0x8c, 0xb2, 0x1b, 0xd5,
5b6f2811172c96 Stephan Müller 2020-01-09 182 0xd6, 0x8b, 0xc2, 0x34, 0xd6,
5b6f2811172c96 Stephan Müller 2020-01-09 183 }, {
5b6f2811172c96 Stephan Müller 2020-01-09 184 0xc3, 0x16, 0x9d, 0xf0, 0x78, 0x15, 0xab, 0xf2,
5b6f2811172c96 Stephan Müller 2020-01-09 185 0x2f, 0xc9, 0x2e, 0xe1, 0xc6, 0x5e, 0xfa, 0x03,
5b6f2811172c96 Stephan Müller 2020-01-09 186 0xaf, 0xd4, 0xd5, 0x47, 0x2a, 0xe8, 0x06, 0xe8,
5b6f2811172c96 Stephan Müller 2020-01-09 187 0x7e, 0x0a, 0x71, 0xc7, 0x0d, 0x39, 0xb1, 0xa9,
5b6f2811172c96 Stephan Müller 2020-01-09 188 0x5a, 0x49, 0xee, 0x8b, 0x2f, 0xcd, 0xea, 0x96,
5b6f2811172c96 Stephan Müller 2020-01-09 189 0xcc, 0x08, 0x71, 0xef, 0x9c,
5b6f2811172c96 Stephan Müller 2020-01-09 190 }, {
5b6f2811172c96 Stephan Müller 2020-01-09 191 0x1a, 0x3d, 0x70, 0x39, 0xc2, 0x02, 0x4d, 0x3a,
5b6f2811172c96 Stephan Müller 2020-01-09 192 0xaa, 0x14, 0x20, 0x88, 0x96, 0x4c, 0x7c, 0xe4,
5b6f2811172c96 Stephan Müller 2020-01-09 193 0xaa, 0x49, 0x89, 0x30, 0x50, 0x96, 0xb6, 0xa7,
5b6f2811172c96 Stephan Müller 2020-01-09 194 0x55, 0x0a, 0xf8, 0xd2, 0x4e, 0x83, 0x9d, 0x1f,
5b6f2811172c96 Stephan Müller 2020-01-09 195 0x56, 0x49, 0x13, 0xc6, 0x46, 0x55, 0x73, 0x0d,
5b6f2811172c96 Stephan Müller 2020-01-09 196 0x74, 0xcd, 0x81, 0xe0, 0x65,
5b6f2811172c96 Stephan Müller 2020-01-09 197 }, {
5b6f2811172c96 Stephan Müller 2020-01-09 198 0x4b, 0xf6, 0x49, 0x89, 0x2a, 0x9f, 0x67, 0xd7,
5b6f2811172c96 Stephan Müller 2020-01-09 199 0xb8, 0x1d, 0xbb, 0x5d, 0xf0, 0x1b, 0x60, 0xb6,
5b6f2811172c96 Stephan Müller 2020-01-09 200 0xb7, 0xf3, 0x86, 0x6d, 0xe0, 0x04, 0xa1, 0xbc,
5b6f2811172c96 Stephan Müller 2020-01-09 201 0x3b, 0xb0, 0x10, 0x91, 0xe8, 0x22, 0x67, 0x5b,
5b6f2811172c96 Stephan Müller 2020-01-09 202 0xe8, 0xf0, 0x4f, 0x82, 0x70, 0xc7, 0xe1, 0xc8,
5b6f2811172c96 Stephan Müller 2020-01-09 203 0xd8, 0xad, 0x70, 0xcf, 0xf6,
5b6f2811172c96 Stephan Müller 2020-01-09 204 }, {
5b6f2811172c96 Stephan Müller 2020-01-09 205 0x60, 0x1f, 0x71, 0x07, 0x92, 0xae, 0xa0, 0x24,
5b6f2811172c96 Stephan Müller 2020-01-09 206 0xb6, 0xa4, 0x10, 0x70, 0x1f, 0x94, 0x51, 0x9a,
5b6f2811172c96 Stephan Müller 2020-01-09 207 0x5a, 0x81, 0xc4, 0x46, 0x78, 0x56, 0x71, 0xdd,
5b6f2811172c96 Stephan Müller 2020-01-09 208 0x45, 0x63, 0x01, 0x34, 0x87, 0x79, 0xb4, 0xd5,
5b6f2811172c96 Stephan Müller 2020-01-09 209 0x91, 0x79, 0xb9, 0x93, 0x11, 0x44, 0x50, 0xad,
5b6f2811172c96 Stephan Müller 2020-01-09 210 0x64, 0x7e, 0x5c, 0xec, 0x16,
5b6f2811172c96 Stephan Müller 2020-01-09 211 }, {
5b6f2811172c96 Stephan Müller 2020-01-09 212 0x49, 0x2f, 0xa0, 0x45, 0xf8, 0xb0, 0x80, 0x88,
5b6f2811172c96 Stephan Müller 2020-01-09 213 0x79, 0xeb, 0xb6, 0x82, 0x1c, 0xf3, 0x67, 0xc4,
5b6f2811172c96 Stephan Müller 2020-01-09 214 0x88, 0x88, 0xe9, 0x75, 0x20, 0x54, 0x78, 0xc6,
5b6f2811172c96 Stephan Müller 2020-01-09 215 0x5c, 0x59, 0xcf, 0xd9, 0x73, 0x12, 0x17, 0xf4,
5b6f2811172c96 Stephan Müller 2020-01-09 216 0x30, 0x9c, 0xb7, 0x21, 0x45, 0xe2, 0xb6, 0x0c,
5b6f2811172c96 Stephan Müller 2020-01-09 217 0x0c, 0xeb, 0x1b, 0xdc, 0xdc,
5b6f2811172c96 Stephan Müller 2020-01-09 218 }
5b6f2811172c96 Stephan Müller 2020-01-09 219 };
5b6f2811172c96 Stephan Müller 2020-01-09 220 struct lrng_pool *lrng_pool, *lrng_pool_aligned;
5b6f2811172c96 Stephan Müller 2020-01-09 221 u8 hash_df[sizeof(lrng_hash_df_selftest_result[0])]
5b6f2811172c96 Stephan Müller 2020-01-09 222 __aligned(sizeof(u32));
5b6f2811172c96 Stephan Müller 2020-01-09 223 u32 generated;
5b6f2811172c96 Stephan Müller 2020-01-09 224 int ret = 0;
5b6f2811172c96 Stephan Müller 2020-01-09 225
5b6f2811172c96 Stephan Müller 2020-01-09 226 BUILD_BUG_ON(ARRAY_SIZE(lrng_hash_df_selftest_result) <
5b6f2811172c96 Stephan Müller 2020-01-09 227 CONFIG_LRNG_POOL_SIZE);
5b6f2811172c96 Stephan Müller 2020-01-09 228
5b6f2811172c96 Stephan Müller 2020-01-09 @229 lrng_pool = kzalloc(sizeof(struct lrng_pool) + sizeof(LRNG_KCAPI_ALIGN),
^^^^^^^^^^^^^^^^^^^^^^^^
Here too.
5b6f2811172c96 Stephan Müller 2020-01-09 230 GFP_KERNEL);
5b6f2811172c96 Stephan Müller 2020-01-09 231 if (!lrng_pool)
5b6f2811172c96 Stephan Müller 2020-01-09 232 return LRNG_SEFLTEST_ERROR_HASHDF;
5b6f2811172c96 Stephan Müller 2020-01-09 233 lrng_pool_aligned = PTR_ALIGN(lrng_pool, sizeof(u32));
5b6f2811172c96 Stephan Müller 2020-01-09 234
5b6f2811172c96 Stephan Müller 2020-01-09 235 generated = __lrng_pool_hash_df(crypto_cb, NULL, lrng_pool_aligned,
5b6f2811172c96 Stephan Müller 2020-01-09 236 hash_df, sizeof(hash_df) << 3);
5b6f2811172c96 Stephan Müller 2020-01-09 237
5b6f2811172c96 Stephan Müller 2020-01-09 238 if ((generated >> 3) != sizeof(hash_df) ||
5b6f2811172c96 Stephan Müller 2020-01-09 239 memcmp(hash_df, lrng_hash_df_selftest_result[CONFIG_LRNG_POOL_SIZE],
5b6f2811172c96 Stephan Müller 2020-01-09 240 sizeof(hash_df))) {
5b6f2811172c96 Stephan Müller 2020-01-09 241 pr_err("LRNG Hash DF self-test FAILED\n");
5b6f2811172c96 Stephan Müller 2020-01-09 242 ret = LRNG_SEFLTEST_ERROR_HASHDF;
5b6f2811172c96 Stephan Müller 2020-01-09 243 }
5b6f2811172c96 Stephan Müller 2020-01-09 244
5b6f2811172c96 Stephan Müller 2020-01-09 245 kfree(lrng_pool);
5b6f2811172c96 Stephan Müller 2020-01-09 246 return ret;
5b6f2811172c96 Stephan Müller 2020-01-09 247 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
2 years, 5 months