Re: [PATCH v2] kasan/quarantine: fix bugs on qlist_move_cache()

From: kbuild test robot
Date: Sat Jul 02 2016 - 04:44:44 EST


Hi,

[auto build test WARNING on v4.7-rc5]
[also build test WARNING on next-20160701]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url: https://github.com/0day-ci/linux/commits/js1304-gmail-com/kasan-quarantine-fix-bugs-on-qlist_move_cache/20160702-102811
config: x86_64-randconfig-r0-07021543 (attached as .config)
compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64

All warnings (new ones prefixed by >>):

mm/kasan/quarantine.c: In function 'qlist_move_cache':
>> mm/kasan/quarantine.c:242:35: warning: unused variable 'tail' [-Wunused-variable]
struct qlist_node *head = NULL, *tail = NULL;
^~~~
>> mm/kasan/quarantine.c:242:21: warning: unused variable 'head' [-Wunused-variable]
struct qlist_node *head = NULL, *tail = NULL;
^~~~

vim +/tail +242 mm/kasan/quarantine.c

226 global_quarantine.bytes - QUARANTINE_LOW_SIZE)
227 break;
228 last = last->next;
229 }
230 qlist_move(&global_quarantine, last, &to_free, size_to_free);
231
232 spin_unlock_irqrestore(&quarantine_lock, flags);
233
234 qlist_free_all(&to_free, NULL);
235 }
236
237 static void qlist_move_cache(struct qlist_head *from,
238 struct qlist_head *to,
239 struct kmem_cache *cache)
240 {
241 struct qlist_node *curr;
> 242 struct qlist_node *head = NULL, *tail = NULL;
243
244 if (unlikely(qlist_empty(from)))
245 return;
246
247 curr = from->head;
248 qlist_init(from);
249 while (curr) {
250 struct qlist_node *qlink = curr;

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation

Attachment: .config.gz
Description: Binary data