drivers/phy/cadence/phy-cadence-torrent.c:138:9: sparse: sparse: cast removes address space '<asn:2>' of expression
by kbuild test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Yuti Amonkar <yamonkar(a)cadence.com>
CC: Kishon Vijay Abraham I <kishon(a)ti.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: b0c3ba31be3e45a130e13b278cf3b90f69bda6f6
commit: c589e7014ffc78a46e4793e2110cbf3b0dd476a1 phy: cadence-dp: Rename to phy-cadence-torrent
date: 10 weeks ago
:::::: branch date: 21 hours ago
:::::: commit date: 10 weeks ago
config: m68k-randconfig-s031-20200528 (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-240-gf0fe1cd9-dirty
git checkout c589e7014ffc78a46e4793e2110cbf3b0dd476a1
# save the attached .config to linux build tree
make W=1 C=1 ARCH=m68k CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/phy/cadence/phy-cadence-torrent.c:138:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:187:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:191:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:376:15: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:376:15: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:403:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:405:15: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:405:15: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:412:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:415:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:417:15: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:417:15: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:424:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:210:15: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:210:15: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:232:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:233:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:234:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:235:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:236:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:237:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:238:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:239:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:240:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:241:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:242:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:243:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:244:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:245:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:246:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:247:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:248:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:249:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:251:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:252:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:253:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:254:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:255:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:256:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:257:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:258:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:259:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:353:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:354:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:355:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:356:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:357:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:358:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:360:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:361:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:269:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:270:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:271:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:272:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:277:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:278:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:279:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:280:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:285:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:286:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:287:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:288:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:292:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:293:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:294:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:295:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:299:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:300:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:310:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:338:9: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:342:17: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:436:20: sparse: sparse: cast removes address space '<asn:2>' of expression
drivers/phy/cadence/phy-cadence-torrent.c:437:9: sparse: sparse: cast removes address space '<asn:2>' of expression
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout c589e7014ffc78a46e4793e2110cbf3b0dd476a1
vim +138 drivers/phy/cadence/phy-cadence-torrent.c
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 131
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 132 static int cdns_dp_phy_init(struct phy *phy)
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 133 {
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 134 unsigned char lane_bits;
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 135
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 136 struct cdns_dp_phy *cdns_phy = phy_get_drvdata(phy);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 137
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 @138 writel(0x0003, cdns_phy->base + PHY_AUX_CTRL); /* enable AUX */
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 139
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 140 /* PHY PMA registers configuration function */
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 141 cdns_dp_phy_pma_cfg(cdns_phy);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 142
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 143 /*
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 144 * Set lines power state to A0
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 145 * Set lines pll clk enable to 0
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 146 */
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 147
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 148 cdns_dp_phy_write_field(cdns_phy, PHY_PMA_XCVR_POWER_STATE_REQ,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 149 PHY_POWER_STATE_LN_0, 6, 0x0000);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 150
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 151 if (cdns_phy->num_lanes >= 2) {
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 152 cdns_dp_phy_write_field(cdns_phy,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 153 PHY_PMA_XCVR_POWER_STATE_REQ,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 154 PHY_POWER_STATE_LN_1, 6, 0x0000);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 155
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 156 if (cdns_phy->num_lanes == 4) {
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 157 cdns_dp_phy_write_field(cdns_phy,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 158 PHY_PMA_XCVR_POWER_STATE_REQ,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 159 PHY_POWER_STATE_LN_2, 6, 0);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 160 cdns_dp_phy_write_field(cdns_phy,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 161 PHY_PMA_XCVR_POWER_STATE_REQ,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 162 PHY_POWER_STATE_LN_3, 6, 0);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 163 }
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 164 }
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 165
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 166 cdns_dp_phy_write_field(cdns_phy, PHY_PMA_XCVR_PLLCLK_EN,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 167 0, 1, 0x0000);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 168
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 169 if (cdns_phy->num_lanes >= 2) {
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 170 cdns_dp_phy_write_field(cdns_phy, PHY_PMA_XCVR_PLLCLK_EN,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 171 1, 1, 0x0000);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 172 if (cdns_phy->num_lanes == 4) {
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 173 cdns_dp_phy_write_field(cdns_phy,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 174 PHY_PMA_XCVR_PLLCLK_EN,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 175 2, 1, 0x0000);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 176 cdns_dp_phy_write_field(cdns_phy,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 177 PHY_PMA_XCVR_PLLCLK_EN,
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 178 3, 1, 0x0000);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 179 }
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 180 }
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 181
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 182 /*
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 183 * release phy_l0*_reset_n and pma_tx_elec_idle_ln_* based on
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 184 * used lanes
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 185 */
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 186 lane_bits = (1 << cdns_phy->num_lanes) - 1;
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 187 writel(((0xF & ~lane_bits) << 4) | (0xF & lane_bits),
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 188 cdns_phy->base + PHY_RESET);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 189
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 190 /* release pma_xcvr_pllclk_en_ln_*, only for the master lane */
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 191 writel(0x0001, cdns_phy->base + PHY_PMA_XCVR_PLLCLK_EN);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 192
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 193 /* PHY PMA registers configuration functions */
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 194 cdns_dp_phy_pma_cmn_vco_cfg_25mhz(cdns_phy);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 195 cdns_dp_phy_pma_cmn_rate(cdns_phy);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 196
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 197 /* take out of reset */
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 198 cdns_dp_phy_write_field(cdns_phy, PHY_RESET, 8, 1, 1);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 199 cdns_dp_phy_wait_pma_cmn_ready(cdns_phy);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 200 cdns_dp_phy_run(cdns_phy);
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 201
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 202 return 0;
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 203 }
c8b427edc7378f drivers/phy/cadence/phy-cadence-dp.c Scott Telford 2018-08-09 204
:::::: The code at line 138 was first introduced by commit
:::::: c8b427edc7378fa540a03d44ed61eb49cb7f64bc phy: Add driver for Cadence MHDP DisplayPort SD0801 PHY
:::::: TO: Scott Telford <stelford(a)cadence.com>
:::::: CC: Kishon Vijay Abraham I <kishon(a)ti.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH] Bluetooth: Acquire sk_lock.slock without disabling interrupts
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200527193919.1655228-1-bigeasy(a)linutronix.de>
References: <20200527193919.1655228-1-bigeasy(a)linutronix.de>
TO: Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
TO: linux-bluetooth(a)vger.kernel.org
CC: Marcel Holtmann <marcel(a)holtmann.org>
CC: Johan Hedberg <johan.hedberg(a)gmail.com>
CC: Thomas Gleixner <tglx(a)linutronix.de>
CC: "Luis Claudio R . Goncalves" <lclaudio(a)uudg.org>
CC: Sebastian Andrzej Siewior <bigeasy(a)linutronix.de>
Hi Sebastian,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on bluetooth-next/master]
[also build test WARNING on v5.7-rc7 next-20200526]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Sebastian-Andrzej-Siewior/Blueto...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bluetooth/bluetooth-next.git master
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
config: i386-randconfig-s001-20200528 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-240-gf0fe1cd9-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> net/bluetooth/rfcomm/sock.c:64:13: sparse: sparse: context imbalance in 'rfcomm_sk_state_change' - wrong count at exit
# https://github.com/0day-ci/linux/commit/dc48a377813eebe5a9e4818d98f51df0d...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout dc48a377813eebe5a9e4818d98f51df0da9476fc
vim +/rfcomm_sk_state_change +64 net/bluetooth/rfcomm/sock.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 63
^1da177e4c3f41 Linus Torvalds 2005-04-16 @64 static void rfcomm_sk_state_change(struct rfcomm_dlc *d, int err)
^1da177e4c3f41 Linus Torvalds 2005-04-16 65 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 66 struct sock *sk = d->owner, *parent;
fad003b6c8e3d9 Gustavo Padovan 2010-08-14 67
^1da177e4c3f41 Linus Torvalds 2005-04-16 68 if (!sk)
^1da177e4c3f41 Linus Torvalds 2005-04-16 69 return;
^1da177e4c3f41 Linus Torvalds 2005-04-16 70
^1da177e4c3f41 Linus Torvalds 2005-04-16 71 BT_DBG("dlc %p state %ld err %d", d, d->state, err);
^1da177e4c3f41 Linus Torvalds 2005-04-16 72
dc48a377813eeb Sebastian Andrzej Siewior 2020-05-27 73 spin_lock_bh(&sk->sk_lock.slock);
^1da177e4c3f41 Linus Torvalds 2005-04-16 74
^1da177e4c3f41 Linus Torvalds 2005-04-16 75 if (err)
^1da177e4c3f41 Linus Torvalds 2005-04-16 76 sk->sk_err = err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 77
^1da177e4c3f41 Linus Torvalds 2005-04-16 78 sk->sk_state = d->state;
^1da177e4c3f41 Linus Torvalds 2005-04-16 79
^1da177e4c3f41 Linus Torvalds 2005-04-16 80 parent = bt_sk(sk)->parent;
^1da177e4c3f41 Linus Torvalds 2005-04-16 81 if (parent) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 82 if (d->state == BT_CLOSED) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 83 sock_set_flag(sk, SOCK_ZAPPED);
^1da177e4c3f41 Linus Torvalds 2005-04-16 84 bt_accept_unlink(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 85 }
676d23690fb62b David S. Miller 2014-04-11 86 parent->sk_data_ready(parent);
^1da177e4c3f41 Linus Torvalds 2005-04-16 87 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 88 if (d->state == BT_CONNECTED)
94a86df0108255 Marcel Holtmann 2013-10-13 89 rfcomm_session_getaddr(d->session,
94a86df0108255 Marcel Holtmann 2013-10-13 90 &rfcomm_pi(sk)->src, NULL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 91 sk->sk_state_change(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 92 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 93
dc48a377813eeb Sebastian Andrzej Siewior 2020-05-27 94 spin_lock_bh(&sk->sk_lock.slock);
^1da177e4c3f41 Linus Torvalds 2005-04-16 95
^1da177e4c3f41 Linus Torvalds 2005-04-16 96 if (parent && sock_flag(sk, SOCK_ZAPPED)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 97 /* We have to drop DLC lock here, otherwise
^1da177e4c3f41 Linus Torvalds 2005-04-16 98 * rfcomm_sock_destruct() will dead lock. */
^1da177e4c3f41 Linus Torvalds 2005-04-16 99 rfcomm_dlc_unlock(d);
^1da177e4c3f41 Linus Torvalds 2005-04-16 100 rfcomm_sock_kill(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 101 rfcomm_dlc_lock(d);
^1da177e4c3f41 Linus Torvalds 2005-04-16 102 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 103 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 104
:::::: The code at line 64 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH] gpiolib: split character device into gpiolib-cdev
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200527154005.6827-1-warthog618(a)gmail.com>
References: <20200527154005.6827-1-warthog618(a)gmail.com>
TO: Kent Gibson <warthog618(a)gmail.com>
TO: linux-kernel(a)vger.kernel.org
TO: linux-gpio(a)vger.kernel.org
TO: bgolaszewski(a)baylibre.com
TO: linus.walleij(a)linaro.org
CC: Kent Gibson <warthog618(a)gmail.com>
Hi Kent,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on v5.7-rc5]
[cannot apply to gpio/for-next linus/master linux/master v5.7-rc7 v5.7-rc6 next-20200526]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Kent-Gibson/gpiolib-split-charac...
base: 2ef96a5bb12be62ef75b5828c0aab838ebb29cb8
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: mips-randconfig-c022-20200527 (attached as .config)
compiler: mipsel-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/gpio/gpiolib-cdev.c:1043:7-23: WARNING: gpio_fileops: .read() has stream semantic; safe to change nonseekable_open -> stream_open.
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH 1/4] scsi: convert target lookup to xarray
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200527141400.58087-2-hare(a)suse.de>
References: <20200527141400.58087-2-hare(a)suse.de>
TO: Hannes Reinecke <hare(a)suse.de>
TO: "Martin K. Petersen" <martin.petersen(a)oracle.com>
CC: Christoph Hellwig <hch(a)lst.de>
CC: Doug Gilbert <dgilbert(a)interlog.com>
CC: Daniel Wagner <daniel.wagner(a)suse.com>
CC: James Bottomley <james.bottomley(a)hansenpartnership.com>
CC: linux-scsi(a)vger.kernel.org
CC: Hannes Reinecke <hare(a)suse.de>
Hi Hannes,
I love your patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[also build test WARNING on scsi/for-next v5.7-rc7 next-20200526]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Hannes-Reinecke/scsi-use-xarray-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
:::::: branch date: 12 hours ago
:::::: commit date: 12 hours ago
config: i386-randconfig-s001-20200528 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-240-gf0fe1cd9-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=i386 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/scsi/scsi_scan.c:392:27: sparse: sparse: context imbalance in 'scsi_alloc_target' - different lock contexts for basic block
# https://github.com/0day-ci/linux/commit/45b149b239ea9a86968ddbd8ecda1e6c4...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 45b149b239ea9a86968ddbd8ecda1e6c44937b68
vim +/scsi_alloc_target +392 drivers/scsi/scsi_scan.c
e63ed0d7a98014 James Bottomley 2014-01-21 379
884d25cc4fda20 James Bottomley 2006-09-05 380 /**
884d25cc4fda20 James Bottomley 2006-09-05 381 * scsi_alloc_target - allocate a new or find an existing target
884d25cc4fda20 James Bottomley 2006-09-05 382 * @parent: parent of the target (need not be a scsi host)
884d25cc4fda20 James Bottomley 2006-09-05 383 * @channel: target channel number (zero if no channels)
884d25cc4fda20 James Bottomley 2006-09-05 384 * @id: target id number
884d25cc4fda20 James Bottomley 2006-09-05 385 *
884d25cc4fda20 James Bottomley 2006-09-05 386 * Return an existing target if one exists, provided it hasn't already
884d25cc4fda20 James Bottomley 2006-09-05 387 * gone into STARGET_DEL state, otherwise allocate a new target.
884d25cc4fda20 James Bottomley 2006-09-05 388 *
884d25cc4fda20 James Bottomley 2006-09-05 389 * The target is returned with an incremented reference, so the caller
884d25cc4fda20 James Bottomley 2006-09-05 390 * is responsible for both reaping and doing a last put
884d25cc4fda20 James Bottomley 2006-09-05 391 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 @392 static struct scsi_target *scsi_alloc_target(struct device *parent,
^1da177e4c3f41 Linus Torvalds 2005-04-16 393 int channel, uint id)
^1da177e4c3f41 Linus Torvalds 2005-04-16 394 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 395 struct Scsi_Host *shost = dev_to_shost(parent);
^1da177e4c3f41 Linus Torvalds 2005-04-16 396 struct device *dev = NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 397 unsigned long flags;
^1da177e4c3f41 Linus Torvalds 2005-04-16 398 const int size = sizeof(struct scsi_target)
^1da177e4c3f41 Linus Torvalds 2005-04-16 399 + shost->transportt->target_size;
5c44cd2afad3f7 James.Smart(a)Emulex.Com 2005-06-10 400 struct scsi_target *starget;
^1da177e4c3f41 Linus Torvalds 2005-04-16 401 struct scsi_target *found_target;
e63ed0d7a98014 James Bottomley 2014-01-21 402 int error, ref_got;
45b149b239ea9a Hannes Reinecke 2020-05-27 403 unsigned long tid;
^1da177e4c3f41 Linus Torvalds 2005-04-16 404
24669f75a3231f Jes Sorensen 2006-01-16 405 starget = kzalloc(size, GFP_KERNEL);
^1da177e4c3f41 Linus Torvalds 2005-04-16 406 if (!starget) {
cadbd4a5e36dde Harvey Harrison 2008-07-03 407 printk(KERN_ERR "%s: allocation failure\n", __func__);
^1da177e4c3f41 Linus Torvalds 2005-04-16 408 return NULL;
^1da177e4c3f41 Linus Torvalds 2005-04-16 409 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 410 dev = &starget->dev;
^1da177e4c3f41 Linus Torvalds 2005-04-16 411 device_initialize(dev);
e63ed0d7a98014 James Bottomley 2014-01-21 412 kref_init(&starget->reap_ref);
^1da177e4c3f41 Linus Torvalds 2005-04-16 413 dev->parent = get_device(parent);
71610f55fa4db6 Kay Sievers 2008-12-03 414 dev_set_name(dev, "target%d:%d:%d", shost->host_no, channel, id);
b0ed43360fdca2 Hannes Reinecke 2008-03-18 415 dev->bus = &scsi_bus_type;
b0ed43360fdca2 Hannes Reinecke 2008-03-18 416 dev->type = &scsi_target_type;
^1da177e4c3f41 Linus Torvalds 2005-04-16 417 starget->id = id;
^1da177e4c3f41 Linus Torvalds 2005-04-16 418 starget->channel = channel;
f0c0a376d0fcd4 Mike Christie 2008-08-17 419 starget->can_queue = 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 420 INIT_LIST_HEAD(&starget->devices);
643eb2d932c97a James Bottomley 2008-03-22 421 starget->state = STARGET_CREATED;
7c9d6f16f50d3a Alan Stern 2007-01-08 422 starget->scsi_level = SCSI_2;
c53a284f8be237 Edward Goggin 2009-04-09 423 starget->max_target_blocked = SCSI_DEFAULT_TARGET_BLOCKED;
45b149b239ea9a Hannes Reinecke 2020-05-27 424 tid = scsi_target_index(starget);
ffedb4522571ac James Bottomley 2006-02-23 425 retry:
^1da177e4c3f41 Linus Torvalds 2005-04-16 426 spin_lock_irqsave(shost->host_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 427
45b149b239ea9a Hannes Reinecke 2020-05-27 428 found_target = xa_load(&shost->__targets, tid);
^1da177e4c3f41 Linus Torvalds 2005-04-16 429 if (found_target)
^1da177e4c3f41 Linus Torvalds 2005-04-16 430 goto found;
45b149b239ea9a Hannes Reinecke 2020-05-27 431 if (xa_insert(&shost->__targets, tid, starget, GFP_KERNEL)) {
45b149b239ea9a Hannes Reinecke 2020-05-27 432 dev_printk(KERN_ERR, dev, "target index busy\n");
45b149b239ea9a Hannes Reinecke 2020-05-27 433 kfree(starget);
45b149b239ea9a Hannes Reinecke 2020-05-27 434 return NULL;
45b149b239ea9a Hannes Reinecke 2020-05-27 435 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 436 spin_unlock_irqrestore(shost->host_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 437 /* allocate and add */
a283bd37d00e92 James Bottomley 2005-05-24 438 transport_setup_device(dev);
a283bd37d00e92 James Bottomley 2005-05-24 439 if (shost->hostt->target_alloc) {
32f95792500794 Brian King 2006-02-22 440 error = shost->hostt->target_alloc(starget);
a283bd37d00e92 James Bottomley 2005-05-24 441
a283bd37d00e92 James Bottomley 2005-05-24 442 if(error) {
a283bd37d00e92 James Bottomley 2005-05-24 443 dev_printk(KERN_ERR, dev, "target allocation failed, error %d\n", error);
a283bd37d00e92 James Bottomley 2005-05-24 444 /* don't want scsi_target_reap to do the final
a283bd37d00e92 James Bottomley 2005-05-24 445 * put because it will be under the host lock */
643eb2d932c97a James Bottomley 2008-03-22 446 scsi_target_destroy(starget);
a283bd37d00e92 James Bottomley 2005-05-24 447 return NULL;
a283bd37d00e92 James Bottomley 2005-05-24 448 }
a283bd37d00e92 James Bottomley 2005-05-24 449 }
884d25cc4fda20 James Bottomley 2006-09-05 450 get_device(dev);
a283bd37d00e92 James Bottomley 2005-05-24 451
^1da177e4c3f41 Linus Torvalds 2005-04-16 452 return starget;
^1da177e4c3f41 Linus Torvalds 2005-04-16 453
^1da177e4c3f41 Linus Torvalds 2005-04-16 454 found:
e63ed0d7a98014 James Bottomley 2014-01-21 455 /*
e63ed0d7a98014 James Bottomley 2014-01-21 456 * release routine already fired if kref is zero, so if we can still
e63ed0d7a98014 James Bottomley 2014-01-21 457 * take the reference, the target must be alive. If we can't, it must
e63ed0d7a98014 James Bottomley 2014-01-21 458 * be dying and we need to wait for a new target
e63ed0d7a98014 James Bottomley 2014-01-21 459 */
e63ed0d7a98014 James Bottomley 2014-01-21 460 ref_got = kref_get_unless_zero(&found_target->reap_ref);
e63ed0d7a98014 James Bottomley 2014-01-21 461
^1da177e4c3f41 Linus Torvalds 2005-04-16 462 spin_unlock_irqrestore(shost->host_lock, flags);
e63ed0d7a98014 James Bottomley 2014-01-21 463 if (ref_got) {
12fb8c1574d7d0 Alan Stern 2010-03-18 464 put_device(dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 465 return found_target;
^1da177e4c3f41 Linus Torvalds 2005-04-16 466 }
e63ed0d7a98014 James Bottomley 2014-01-21 467 /*
e63ed0d7a98014 James Bottomley 2014-01-21 468 * Unfortunately, we found a dying target; need to wait until it's
e63ed0d7a98014 James Bottomley 2014-01-21 469 * dead before we can get a new one. There is an anomaly here. We
e63ed0d7a98014 James Bottomley 2014-01-21 470 * *should* call scsi_target_reap() to balance the kref_get() of the
e63ed0d7a98014 James Bottomley 2014-01-21 471 * reap_ref above. However, since the target being released, it's
e63ed0d7a98014 James Bottomley 2014-01-21 472 * already invisible and the reap_ref is irrelevant. If we call
e63ed0d7a98014 James Bottomley 2014-01-21 473 * scsi_target_reap() we might spuriously do another device_del() on
e63ed0d7a98014 James Bottomley 2014-01-21 474 * an already invisible target.
e63ed0d7a98014 James Bottomley 2014-01-21 475 */
ffedb4522571ac James Bottomley 2006-02-23 476 put_device(&found_target->dev);
e63ed0d7a98014 James Bottomley 2014-01-21 477 /*
e63ed0d7a98014 James Bottomley 2014-01-21 478 * length of time is irrelevant here, we just want to yield the CPU
e63ed0d7a98014 James Bottomley 2014-01-21 479 * for a tick to avoid busy waiting for the target to die.
e63ed0d7a98014 James Bottomley 2014-01-21 480 */
e63ed0d7a98014 James Bottomley 2014-01-21 481 msleep(1);
ffedb4522571ac James Bottomley 2006-02-23 482 goto retry;
ffedb4522571ac James Bottomley 2006-02-23 483 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 484
:::::: The code at line 392 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH v3 03/11] md/raid5: allocate and free pages of r5pages
by kbuild test robot
CC: kbuild-all(a)lists.01.org
In-Reply-To: <20200527131933.34400-4-yuyufen(a)huawei.com>
References: <20200527131933.34400-4-yuyufen(a)huawei.com>
TO: Yufen Yu <yuyufen(a)huawei.com>
TO: song(a)kernel.org
CC: linux-raid(a)vger.kernel.org
CC: neilb(a)suse.com
CC: guoqing.jiang(a)cloud.ionos.com
CC: colyli(a)suse.de
CC: xni(a)redhat.com
CC: houtao1(a)huawei.com
CC: yuyufen(a)huawei.com
Hi Yufen,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on cryptodev/master]
[also build test WARNING on crypto/master linus/master v5.7-rc7 next-20200526]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Yufen-Yu/md-raid5-set-STRIPE_SIZ...
base: https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git master
:::::: branch date: 9 hours ago
:::::: commit date: 9 hours ago
config: sparc64-randconfig-c023-20200527 (attached as .config)
compiler: sparc64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/md/raid5.c:2191:2-7: WARNING: NULL check before some freeing functions is not needed.
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[linux-next:master 12558/12912] net/ipv4/tcp_ipv4.c:576 tcp_v4_err() error: uninitialized symbol 'skb'.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b0523c7b1c9d0edcd6c0fe6d2cb558a9ad5c60a8
commit: 45af29ca761c275e350cca659856bc56f1035ef9 [12558/12912] tcp: allow traceroute -Mtcp for unpriv users
config: i386-randconfig-m021-20200526 (attached as .config)
compiler: gcc-7 (Ubuntu 7.5.0-6ubuntu2) 7.5.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
net/ipv4/tcp_ipv4.c:576 tcp_v4_err() error: uninitialized symbol 'skb'.
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout 45af29ca761c275e350cca659856bc56f1035ef9
vim +/skb +576 net/ipv4/tcp_ipv4.c
32bbd8793f24b0 Stefano Brivio 2018-11-08 422 int tcp_v4_err(struct sk_buff *icmp_skb, u32 info)
^1da177e4c3f41 Linus Torvalds 2005-04-16 423 {
b71d1d426d263b Eric Dumazet 2011-04-22 424 const struct iphdr *iph = (const struct iphdr *)icmp_skb->data;
4d1a2d9ec1c17d Damian Lukowski 2009-08-26 425 struct tcphdr *th = (struct tcphdr *)(icmp_skb->data + (iph->ihl << 2));
f1ecd5d9e73666 Damian Lukowski 2009-08-26 426 struct inet_connection_sock *icsk;
^1da177e4c3f41 Linus Torvalds 2005-04-16 427 struct tcp_sock *tp;
^1da177e4c3f41 Linus Torvalds 2005-04-16 428 struct inet_sock *inet;
4d1a2d9ec1c17d Damian Lukowski 2009-08-26 429 const int type = icmp_hdr(icmp_skb)->type;
4d1a2d9ec1c17d Damian Lukowski 2009-08-26 430 const int code = icmp_hdr(icmp_skb)->code;
^1da177e4c3f41 Linus Torvalds 2005-04-16 431 struct sock *sk;
f1ecd5d9e73666 Damian Lukowski 2009-08-26 432 struct sk_buff *skb;
0a672f74131dd6 Yuchung Cheng 2014-05-11 433 struct request_sock *fastopen;
9a568de4818dea Eric Dumazet 2017-05-16 434 u32 seq, snd_una;
9a568de4818dea Eric Dumazet 2017-05-16 435 s32 remaining;
9a568de4818dea Eric Dumazet 2017-05-16 436 u32 delta_us;
^1da177e4c3f41 Linus Torvalds 2005-04-16 437 int err;
4d1a2d9ec1c17d Damian Lukowski 2009-08-26 438 struct net *net = dev_net(icmp_skb->dev);
^1da177e4c3f41 Linus Torvalds 2005-04-16 439
26e3736090e103 Eric Dumazet 2015-03-22 440 sk = __inet_lookup_established(net, &tcp_hashinfo, iph->daddr,
26e3736090e103 Eric Dumazet 2015-03-22 441 th->dest, iph->saddr, ntohs(th->source),
3fa6f616a7a4d0 David Ahern 2017-08-07 442 inet_iif(icmp_skb), 0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 443 if (!sk) {
5d3848bc33b7d1 Eric Dumazet 2016-04-27 444 __ICMP_INC_STATS(net, ICMP_MIB_INERRORS);
32bbd8793f24b0 Stefano Brivio 2018-11-08 445 return -ENOENT;
^1da177e4c3f41 Linus Torvalds 2005-04-16 446 }
I guess can "sk->sk_state" start as TCP_SYN_SENT/RECV? Smatch doesn't
know.
^1da177e4c3f41 Linus Torvalds 2005-04-16 447 if (sk->sk_state == TCP_TIME_WAIT) {
9469c7b4aa210c YOSHIFUJI Hideaki 2006-10-10 448 inet_twsk_put(inet_twsk(sk));
32bbd8793f24b0 Stefano Brivio 2018-11-08 449 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 450 }
26e3736090e103 Eric Dumazet 2015-03-22 451 seq = ntohl(th->seq);
32bbd8793f24b0 Stefano Brivio 2018-11-08 452 if (sk->sk_state == TCP_NEW_SYN_RECV) {
32bbd8793f24b0 Stefano Brivio 2018-11-08 453 tcp_req_err(sk, seq, type == ICMP_PARAMETERPROB ||
9cf7490360bf2c Eric Dumazet 2016-02-02 454 type == ICMP_TIME_EXCEEDED ||
9cf7490360bf2c Eric Dumazet 2016-02-02 455 (type == ICMP_DEST_UNREACH &&
9cf7490360bf2c Eric Dumazet 2016-02-02 456 (code == ICMP_NET_UNREACH ||
9cf7490360bf2c Eric Dumazet 2016-02-02 457 code == ICMP_HOST_UNREACH)));
32bbd8793f24b0 Stefano Brivio 2018-11-08 458 return 0;
32bbd8793f24b0 Stefano Brivio 2018-11-08 459 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 460
^1da177e4c3f41 Linus Torvalds 2005-04-16 461 bh_lock_sock(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 462 /* If too many ICMPs get dropped on busy
^1da177e4c3f41 Linus Torvalds 2005-04-16 463 * servers this needs to be solved differently.
563d34d0578626 Eric Dumazet 2012-07-23 464 * We do take care of PMTU discovery (RFC1191) special case :
563d34d0578626 Eric Dumazet 2012-07-23 465 * we can receive locally generated ICMP messages while socket is held.
^1da177e4c3f41 Linus Torvalds 2005-04-16 466 */
b74aa930ef49a3 Eric Dumazet 2013-01-19 467 if (sock_owned_by_user(sk)) {
b74aa930ef49a3 Eric Dumazet 2013-01-19 468 if (!(type == ICMP_DEST_UNREACH && code == ICMP_FRAG_NEEDED))
02a1d6e7a6bb02 Eric Dumazet 2016-04-27 469 __NET_INC_STATS(net, LINUX_MIB_LOCKDROPPEDICMPS);
b74aa930ef49a3 Eric Dumazet 2013-01-19 470 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 471 if (sk->sk_state == TCP_CLOSE)
^1da177e4c3f41 Linus Torvalds 2005-04-16 472 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 473
97e3ecd112ba45 stephen hemminger 2010-03-18 474 if (unlikely(iph->ttl < inet_sk(sk)->min_ttl)) {
02a1d6e7a6bb02 Eric Dumazet 2016-04-27 475 __NET_INC_STATS(net, LINUX_MIB_TCPMINTTLDROP);
97e3ecd112ba45 stephen hemminger 2010-03-18 476 goto out;
97e3ecd112ba45 stephen hemminger 2010-03-18 477 }
97e3ecd112ba45 stephen hemminger 2010-03-18 478
f1ecd5d9e73666 Damian Lukowski 2009-08-26 479 icsk = inet_csk(sk);
^1da177e4c3f41 Linus Torvalds 2005-04-16 480 tp = tcp_sk(sk);
0a672f74131dd6 Yuchung Cheng 2014-05-11 481 /* XXX (TFO) - tp->snd_una should be ISN (tcp_create_openreq_child() */
d983ea6f16b835 Eric Dumazet 2019-10-10 482 fastopen = rcu_dereference(tp->fastopen_rsk);
0a672f74131dd6 Yuchung Cheng 2014-05-11 483 snd_una = fastopen ? tcp_rsk(fastopen)->snt_isn : tp->snd_una;
^1da177e4c3f41 Linus Torvalds 2005-04-16 484 if (sk->sk_state != TCP_LISTEN &&
0a672f74131dd6 Yuchung Cheng 2014-05-11 485 !between(seq, snd_una, tp->snd_nxt)) {
02a1d6e7a6bb02 Eric Dumazet 2016-04-27 486 __NET_INC_STATS(net, LINUX_MIB_OUTOFWINDOWICMPS);
^1da177e4c3f41 Linus Torvalds 2005-04-16 487 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 488 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 489
^1da177e4c3f41 Linus Torvalds 2005-04-16 490 switch (type) {
55be7a9c6074f7 David S. Miller 2012-07-11 491 case ICMP_REDIRECT:
45caeaa5ac0b4b Jon Maxwell 2017-03-10 492 if (!sock_owned_by_user(sk))
55be7a9c6074f7 David S. Miller 2012-07-11 493 do_redirect(icmp_skb, sk);
55be7a9c6074f7 David S. Miller 2012-07-11 494 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 495 case ICMP_SOURCE_QUENCH:
^1da177e4c3f41 Linus Torvalds 2005-04-16 496 /* Just silently ignore these. */
^1da177e4c3f41 Linus Torvalds 2005-04-16 497 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 498 case ICMP_PARAMETERPROB:
^1da177e4c3f41 Linus Torvalds 2005-04-16 499 err = EPROTO;
^1da177e4c3f41 Linus Torvalds 2005-04-16 500 break;
Then we hit a break statement
^1da177e4c3f41 Linus Torvalds 2005-04-16 501 case ICMP_DEST_UNREACH:
^1da177e4c3f41 Linus Torvalds 2005-04-16 502 if (code > NR_ICMP_UNREACH)
^1da177e4c3f41 Linus Torvalds 2005-04-16 503 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 504
^1da177e4c3f41 Linus Torvalds 2005-04-16 505 if (code == ICMP_FRAG_NEEDED) { /* PMTU discovery (RFC1191) */
0d4f0608619de5 Eric Dumazet 2013-03-18 506 /* We are not interested in TCP_LISTEN and open_requests
0d4f0608619de5 Eric Dumazet 2013-03-18 507 * (SYN-ACKs send out by Linux are always <576bytes so
0d4f0608619de5 Eric Dumazet 2013-03-18 508 * they should go through unfragmented).
0d4f0608619de5 Eric Dumazet 2013-03-18 509 */
0d4f0608619de5 Eric Dumazet 2013-03-18 510 if (sk->sk_state == TCP_LISTEN)
0d4f0608619de5 Eric Dumazet 2013-03-18 511 goto out;
0d4f0608619de5 Eric Dumazet 2013-03-18 512
563d34d0578626 Eric Dumazet 2012-07-23 513 tp->mtu_info = info;
144d56e9104418 Eric Dumazet 2012-08-20 514 if (!sock_owned_by_user(sk)) {
563d34d0578626 Eric Dumazet 2012-07-23 515 tcp_v4_mtu_reduced(sk);
144d56e9104418 Eric Dumazet 2012-08-20 516 } else {
7aa5470c2c0926 Eric Dumazet 2016-12-03 517 if (!test_and_set_bit(TCP_MTU_REDUCED_DEFERRED, &sk->sk_tsq_flags))
144d56e9104418 Eric Dumazet 2012-08-20 518 sock_hold(sk);
144d56e9104418 Eric Dumazet 2012-08-20 519 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 520 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 521 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 522
^1da177e4c3f41 Linus Torvalds 2005-04-16 523 err = icmp_err_convert[code].errno;
f1ecd5d9e73666 Damian Lukowski 2009-08-26 524 /* check if icmp_skb allows revert of backoff
f1ecd5d9e73666 Damian Lukowski 2009-08-26 525 * (see draft-zimmermann-tcp-lcd) */
f1ecd5d9e73666 Damian Lukowski 2009-08-26 526 if (code != ICMP_NET_UNREACH && code != ICMP_HOST_UNREACH)
f1ecd5d9e73666 Damian Lukowski 2009-08-26 527 break;
f1ecd5d9e73666 Damian Lukowski 2009-08-26 528 if (seq != tp->snd_una || !icsk->icsk_retransmits ||
0a672f74131dd6 Yuchung Cheng 2014-05-11 529 !icsk->icsk_backoff || fastopen)
f1ecd5d9e73666 Damian Lukowski 2009-08-26 530 break;
f1ecd5d9e73666 Damian Lukowski 2009-08-26 531
8f49c2703b3351 David S. Miller 2010-11-12 532 if (sock_owned_by_user(sk))
8f49c2703b3351 David S. Miller 2010-11-12 533 break;
8f49c2703b3351 David S. Miller 2010-11-12 534
2c4cc9712364c0 Eric Dumazet 2019-02-15 535 skb = tcp_rtx_queue_head(sk);
2c4cc9712364c0 Eric Dumazet 2019-02-15 536 if (WARN_ON_ONCE(!skb))
2c4cc9712364c0 Eric Dumazet 2019-02-15 537 break;
2c4cc9712364c0 Eric Dumazet 2019-02-15 538
f1ecd5d9e73666 Damian Lukowski 2009-08-26 539 icsk->icsk_backoff--;
fcdd1cf4dd63ae Eric Dumazet 2014-09-22 540 icsk->icsk_rto = tp->srtt_us ? __tcp_set_rto(tp) :
fcdd1cf4dd63ae Eric Dumazet 2014-09-22 541 TCP_TIMEOUT_INIT;
fcdd1cf4dd63ae Eric Dumazet 2014-09-22 542 icsk->icsk_rto = inet_csk_rto_backoff(icsk, TCP_RTO_MAX);
f1ecd5d9e73666 Damian Lukowski 2009-08-26 543
f1ecd5d9e73666 Damian Lukowski 2009-08-26 544
9a568de4818dea Eric Dumazet 2017-05-16 545 tcp_mstamp_refresh(tp);
2fd66ffba50716 Eric Dumazet 2018-09-21 546 delta_us = (u32)(tp->tcp_mstamp - tcp_skb_timestamp_us(skb));
7faee5c0d51416 Eric Dumazet 2014-09-05 547 remaining = icsk->icsk_rto -
9a568de4818dea Eric Dumazet 2017-05-16 548 usecs_to_jiffies(delta_us);
f1ecd5d9e73666 Damian Lukowski 2009-08-26 549
9a568de4818dea Eric Dumazet 2017-05-16 550 if (remaining > 0) {
f1ecd5d9e73666 Damian Lukowski 2009-08-26 551 inet_csk_reset_xmit_timer(sk, ICSK_TIME_RETRANS,
f1ecd5d9e73666 Damian Lukowski 2009-08-26 552 remaining, TCP_RTO_MAX);
f1ecd5d9e73666 Damian Lukowski 2009-08-26 553 } else {
f1ecd5d9e73666 Damian Lukowski 2009-08-26 554 /* RTO revert clocked out retransmission.
f1ecd5d9e73666 Damian Lukowski 2009-08-26 555 * Will retransmit now */
f1ecd5d9e73666 Damian Lukowski 2009-08-26 556 tcp_retransmit_timer(sk);
f1ecd5d9e73666 Damian Lukowski 2009-08-26 557 }
f1ecd5d9e73666 Damian Lukowski 2009-08-26 558
^1da177e4c3f41 Linus Torvalds 2005-04-16 559 break;
^1da177e4c3f41 Linus Torvalds 2005-04-16 560 case ICMP_TIME_EXCEEDED:
^1da177e4c3f41 Linus Torvalds 2005-04-16 561 err = EHOSTUNREACH;
^1da177e4c3f41 Linus Torvalds 2005-04-16 562 break;
Or this break statement.
^1da177e4c3f41 Linus Torvalds 2005-04-16 563 default:
^1da177e4c3f41 Linus Torvalds 2005-04-16 564 goto out;
^1da177e4c3f41 Linus Torvalds 2005-04-16 565 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 566
^1da177e4c3f41 Linus Torvalds 2005-04-16 567 switch (sk->sk_state) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 568 case TCP_SYN_SENT:
0a672f74131dd6 Yuchung Cheng 2014-05-11 569 case TCP_SYN_RECV:
0a672f74131dd6 Yuchung Cheng 2014-05-11 570 /* Only in fast or simultaneous open. If a fast open socket is
0a672f74131dd6 Yuchung Cheng 2014-05-11 571 * is already accepted it is treated as a connected one below.
^1da177e4c3f41 Linus Torvalds 2005-04-16 572 */
51456b2914a34d Ian Morris 2015-04-03 573 if (fastopen && !fastopen->sk)
0a672f74131dd6 Yuchung Cheng 2014-05-11 574 break;
0a672f74131dd6 Yuchung Cheng 2014-05-11 575
45af29ca761c27 Eric Dumazet 2020-05-24 @576 ip_icmp_error(sk, skb, err, th->dest, info, (u8 *)th);
^^^
Smatch thinks this can be uninitialized.
45af29ca761c27 Eric Dumazet 2020-05-24 577
^1da177e4c3f41 Linus Torvalds 2005-04-16 578 if (!sock_owned_by_user(sk)) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 579 sk->sk_err = err;
^1da177e4c3f41 Linus Torvalds 2005-04-16 580
^1da177e4c3f41 Linus Torvalds 2005-04-16 581 sk->sk_error_report(sk);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[linux-next:master 11987/12912] net/netfilter/nf_conntrack_core.c:2068 __nf_conntrack_update() error: uninitialized symbol 'ctinfo'.
by Dan Carpenter
[ I'm always a bit concerned when I see that we are checking 12k patches
in the subject. -- dan ]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: b0523c7b1c9d0edcd6c0fe6d2cb558a9ad5c60a8
commit: ee04805ff54a63ffd90bc6749ebfe73473734ddb [11987/12912] netfilter: conntrack: make conntrack userspace helpers work again
config: i386-randconfig-m021-20200527 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-13) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
net/netfilter/nf_conntrack_core.c:2068 __nf_conntrack_update() error: uninitialized symbol 'ctinfo'.
net/netfilter/nf_conntrack_core.c:2117 nf_confirm_cthelper() warn: unsigned 'protoff' is never less than zero.
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git remote update linux-next
git checkout ee04805ff54a63ffd90bc6749ebfe73473734ddb
vim +/ctinfo +2068 net/netfilter/nf_conntrack_core.c
9fb9cbb1082d6b3 Yasuyuki Kozakai 2005-11-09 2018
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2019 static int __nf_conntrack_update(struct net *net, struct sk_buff *skb,
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2020 struct nf_conn *ct)
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2021 {
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2022 struct nf_conntrack_tuple_hash *h;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2023 struct nf_conntrack_tuple tuple;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2024 enum ip_conntrack_info ctinfo;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2025 struct nf_nat_hook *nat_hook;
6816d931cab0090 Florian Westphal 2018-06-29 2026 unsigned int status;
6816d931cab0090 Florian Westphal 2018-06-29 2027 int dataoff;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2028 u16 l3num;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2029 u8 l4num;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2030
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2031 l3num = nf_ct_l3num(ct);
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2032
6816d931cab0090 Florian Westphal 2018-06-29 2033 dataoff = get_l4proto(skb, skb_network_offset(skb), l3num, &l4num);
6816d931cab0090 Florian Westphal 2018-06-29 2034 if (dataoff <= 0)
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2035 return -1;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2036
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2037 if (!nf_ct_get_tuple(skb, skb_network_offset(skb), dataoff, l3num,
303e0c5589592e4 Florian Westphal 2019-01-15 2038 l4num, net, &tuple))
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2039 return -1;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2040
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2041 if (ct->status & IPS_SRC_NAT) {
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2042 memcpy(tuple.src.u3.all,
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2043 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u3.all,
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2044 sizeof(tuple.src.u3.all));
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2045 tuple.src.u.all =
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2046 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.src.u.all;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2047 }
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2048
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2049 if (ct->status & IPS_DST_NAT) {
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2050 memcpy(tuple.dst.u3.all,
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2051 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u3.all,
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2052 sizeof(tuple.dst.u3.all));
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2053 tuple.dst.u.all =
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2054 ct->tuplehash[IP_CT_DIR_ORIGINAL].tuple.dst.u.all;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2055 }
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2056
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2057 h = nf_conntrack_find_get(net, nf_ct_zone(ct), &tuple);
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2058 if (!h)
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2059 return 0;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2060
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2061 /* Store status bits of the conntrack that is clashing to re-do NAT
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2062 * mangling according to what it has been done already to this packet.
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2063 */
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2064 status = ct->status;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2065
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2066 nf_ct_put(ct);
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2067 ct = nf_ct_tuplehash_to_ctrack(h);
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 @2068 nf_ct_set(skb, ct, ctinfo);
^^^^^^
Never initialized.
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2069
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2070 nat_hook = rcu_dereference(nf_nat_hook);
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2071 if (!nat_hook)
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2072 return 0;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2073
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2074 if (status & IPS_SRC_NAT &&
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2075 nat_hook->manip_pkt(skb, ct, NF_NAT_MANIP_SRC,
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2076 IP_CT_DIR_ORIGINAL) == NF_DROP)
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2077 return -1;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2078
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2079 if (status & IPS_DST_NAT &&
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2080 nat_hook->manip_pkt(skb, ct, NF_NAT_MANIP_DST,
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2081 IP_CT_DIR_ORIGINAL) == NF_DROP)
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2082 return -1;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2083
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2084 return 0;
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2085 }
368982cd7d1bd41 Pablo Neira Ayuso 2018-05-23 2086
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2087 /* This packet is coming from userspace via nf_queue, complete the packet
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2088 * processing after the helper invocation in nf_confirm().
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2089 */
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2090 static int nf_confirm_cthelper(struct sk_buff *skb, struct nf_conn *ct,
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2091 enum ip_conntrack_info ctinfo)
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2092 {
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2093 const struct nf_conntrack_helper *helper;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2094 const struct nf_conn_help *help;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2095 unsigned int protoff;
^^^^^^^^^^^^^^^^^^^^
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2096
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2097 help = nfct_help(ct);
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2098 if (!help)
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2099 return 0;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2100
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2101 helper = rcu_dereference(help->helper);
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2102 if (!(helper->flags & NF_CT_HELPER_F_USERSPACE))
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2103 return 0;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2104
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2105 switch (nf_ct_l3num(ct)) {
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2106 case NFPROTO_IPV4:
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2107 protoff = skb_network_offset(skb) + ip_hdrlen(skb);
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2108 break;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2109 #if IS_ENABLED(CONFIG_IPV6)
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2110 case NFPROTO_IPV6: {
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2111 __be16 frag_off;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2112 u8 pnum;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2113
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2114 pnum = ipv6_hdr(skb)->nexthdr;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2115 protoff = ipv6_skip_exthdr(skb, sizeof(struct ipv6hdr), &pnum,
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2116 &frag_off);
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 @2117 if (protoff < 0 || (frag_off & htons(~0x7)) != 0)
^^^^^^^^^^^
Unsigned.
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2118 return 0;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2119 break;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2120 }
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2121 #endif
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2122 default:
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2123 return 0;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2124 }
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2125
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2126 if (test_bit(IPS_SEQ_ADJUST_BIT, &ct->status) &&
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2127 !nf_is_loopback_packet(skb)) {
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2128 if (!nf_ct_seq_adjust(skb, ct, ctinfo, protoff)) {
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2129 NF_CT_STAT_INC_ATOMIC(nf_ct_net(ct), drop);
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2130 return -1;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2131 }
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2132 }
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2133
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2134 /* We've seen it coming out the other side: confirm it */
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2135 return nf_conntrack_confirm(skb) == NF_DROP ? - 1 : 0;
ee04805ff54a63f Pablo Neira Ayuso 2020-05-24 2136 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
2 years
Re: [PATCH 7/8] drm/msm/dpu: add SM8150 to hw catalog
by Dan Carpenter
Hi Jonathan,
Thank you for the patch! Perhaps something to improve:
url: https://github.com/0day-ci/linux/commits/Jonathan-Marek/Initial-SM8150-an...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 9cb1fd0efd195590b828b9b865421ad345a4a145
config: arm64-randconfig-s031-20200527 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-240-gf0fe1cd9-dirty
# save the attached .config to linux build tree
make W=1 C=1 ARCH=arm64 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag as appropriate
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:98:26: sparse: sparse: undefined identifier 'DPU_SSPP_SMART_DMA_V2_5'
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:96:10: sparse: sparse: Initializer entry defined twice
>> drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c:104:10: sparse: also defined here
# https://github.com/0day-ci/linux/commit/6a90302321af832ea18679e1b29b0301c...
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 6a90302321af832ea18679e1b29b0301caade709
vim +104 drivers/gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c
7bdc0c4b812602f Kalyan Thota 2019-11-25 92
6a90302321af832 Jonathan Marek 2020-05-25 93 static const struct dpu_caps sm8150_dpu_caps = {
6a90302321af832 Jonathan Marek 2020-05-25 94 .max_mixer_width = DEFAULT_DPU_OUTPUT_LINE_WIDTH,
6a90302321af832 Jonathan Marek 2020-05-25 95 .max_mixer_blendstages = 0xb,
6a90302321af832 Jonathan Marek 2020-05-25 96 .max_linewidth = 4096,
^^^^^^^^^^^^^^^^^^^^^^
6a90302321af832 Jonathan Marek 2020-05-25 97 .qseed_type = DPU_SSPP_SCALER_QSEED3,
6a90302321af832 Jonathan Marek 2020-05-25 98 .smart_dma_rev = DPU_SSPP_SMART_DMA_V2_5,
6a90302321af832 Jonathan Marek 2020-05-25 99 .ubwc_version = DPU_HW_UBWC_VER_30,
6a90302321af832 Jonathan Marek 2020-05-25 100 .has_src_split = true,
6a90302321af832 Jonathan Marek 2020-05-25 101 .has_dim_layer = true,
6a90302321af832 Jonathan Marek 2020-05-25 102 .has_idle_pc = true,
6a90302321af832 Jonathan Marek 2020-05-25 103 .has_3d_merge = true,
6a90302321af832 Jonathan Marek 2020-05-25 @104 .max_linewidth = 4096,
^^^^^^^^^^^^^^^^^^^^^^
Delete duplicate code.
6a90302321af832 Jonathan Marek 2020-05-25 105 .pixel_ram_size = DEFAULT_PIXEL_RAM_SIZE,
6a90302321af832 Jonathan Marek 2020-05-25 106 .max_hdeci_exp = MAX_HORZ_DECIMATION,
6a90302321af832 Jonathan Marek 2020-05-25 107 .max_vdeci_exp = MAX_VERT_DECIMATION,
6a90302321af832 Jonathan Marek 2020-05-25 108 };
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
kbuild mailing list -- kbuild(a)lists.01.org
To unsubscribe send an email to kbuild-leave(a)lists.01.org
2 years