tree: https://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git work.misc head: 904256144f9d88e6189a904953c91f639ca521aa commit: d0cc075bf99c8b9a108655dc4ff4869bac3dd3b4 [29/30] kernel/*: switch to memdup_user_nul() config: i386-randconfig-x002-12222106 (attached as .config) reproduce: git checkout d0cc075bf99c8b9a108655dc4ff4869bac3dd3b4 # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): kernel/sysctl.c: In function '__do_proc_dointvec': >> kernel/sysctl.c:2122:1: warning: label 'free' defined but not used [-Wunused-label] free: ^ kernel/sysctl.c: In function '__do_proc_doulongvec_minmax': kernel/sysctl.c:2375:1: warning: label 'free' defined but not used [-Wunused-label] free: ^ vim +/free +2122 kernel/sysctl.c 00b7c339 Amerigo Wang 2010-05-05 2106 break; 00b7c339 Amerigo Wang 2010-05-05 2107 } ^1da177e Linus Torvalds 2005-04-16 2108 if (!first) 00b7c339 Amerigo Wang 2010-05-05 2109 err = proc_put_char(&buffer, &left, '\t'); 00b7c339 Amerigo Wang 2010-05-05 2110 if (err) 00b7c339 Amerigo Wang 2010-05-05 2111 break; 00b7c339 Amerigo Wang 2010-05-05 2112 err = proc_put_long(&buffer, &left, lval, neg); 00b7c339 Amerigo Wang 2010-05-05 2113 if (err) ^1da177e Linus Torvalds 2005-04-16 2114 break; ^1da177e Linus Torvalds 2005-04-16 2115 } ^1da177e Linus Torvalds 2005-04-16 2116 } ^1da177e Linus Torvalds 2005-04-16 2117 00b7c339 Amerigo Wang 2010-05-05 2118 if (!write && !first && left && !err) 00b7c339 Amerigo Wang 2010-05-05 2119 err = proc_put_char(&buffer, &left, '\n'); 563b0467 J. R. Okajima 2010-05-25 2120 if (write && !err && left) 00b7c339 Amerigo Wang 2010-05-05 2121 left -= proc_skip_spaces(&kbuf); 00b7c339 Amerigo Wang 2010-05-05 @2122 free: ^1da177e Linus Torvalds 2005-04-16 2123 if (write) { d0cc075b Al Viro 2015-12-24 2124 kfree(kbuf); 00b7c339 Amerigo Wang 2010-05-05 2125 if (first) 00b7c339 Amerigo Wang 2010-05-05 2126 return err ? : -EINVAL; ^1da177e Linus Torvalds 2005-04-16 2127 } ^1da177e Linus Torvalds 2005-04-16 2128 *lenp -= left; f4aacea2 Kees Cook 2014-06-06 2129 out: ^1da177e Linus Torvalds 2005-04-16 2130 *ppos += *lenp; :::::: The code at line 2122 was first introduced by commit :::::: 00b7c3395aec3df43de5bd02a3c5a099ca51169f sysctl: refactor integer handling proc code :::::: TO: Amerigo Wang <amwang@xxxxxxxxxx> :::::: CC: David S. Miller <davem@xxxxxxxxxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
Attachment:
.config.gz
Description: Binary data