[jlelli:deadline/server-rfc_v2 5/6] kernel/sched/deadline.c:1451:31: sparse: sparse: context imbalance in 'inactive_task_timer' - unexpected unlock
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Juri Lelli <juri.lelli(a)redhat.com>
tree: https://github.com/jlelli/linux.git deadline/server-rfc_v2
head: 924ae6f145ff3a46c312647f4b3189abf3ba9d2d
commit: c9d6e71fba18dbb45f311d8297b75a30e4618612 [5/6] sched/deadline: Introduce deadline servers
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
config: x86_64-randconfig-s021-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-115-g5fc204f2-dirty
git checkout c9d6e71fba18dbb45f311d8297b75a30e4618612
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
kernel/sched/deadline.c:1872:42: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected struct sched_dl_entity *b @@ got struct sched_dl_entity [noderef] __rcu * @@
kernel/sched/deadline.c:1872:42: sparse: expected struct sched_dl_entity *b
kernel/sched/deadline.c:1872:42: sparse: got struct sched_dl_entity [noderef] __rcu *
kernel/sched/deadline.c:1158:23: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected struct task_struct *p @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/deadline.c:1158:23: sparse: expected struct task_struct *p
kernel/sched/deadline.c:1158:23: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/deadline.c:1383:38: sparse: sparse: incorrect type in initializer (different address spaces) @@ expected struct task_struct *curr @@ got struct task_struct [noderef] __rcu *curr @@
kernel/sched/deadline.c:1383:38: sparse: expected struct task_struct *curr
kernel/sched/deadline.c:1383:38: sparse: got struct task_struct [noderef] __rcu *curr
kernel/sched/deadline.c:2550:22: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/deadline.c:2550:22: sparse: struct task_struct [noderef] __rcu *
kernel/sched/deadline.c:2550:22: sparse: struct task_struct *
kernel/sched/deadline.c:2569:46: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/deadline.c:2569:46: sparse: struct task_struct [noderef] __rcu *
kernel/sched/deadline.c:2569:46: sparse: struct task_struct *
>> kernel/sched/deadline.c:1451:31: sparse: sparse: context imbalance in 'inactive_task_timer' - unexpected unlock
kernel/sched/deadline.c: note: in included file:
kernel/sched/sched.h:1715:25: sparse: sparse: incompatible types in comparison expression (different address spaces):
kernel/sched/sched.h:1715:25: sparse: struct task_struct [noderef] __rcu *
kernel/sched/sched.h:1715:25: sparse: struct task_struct *
# https://github.com/jlelli/linux/commit/c9d6e71fba18dbb45f311d8297b75a30e4...
git remote add jlelli https://github.com/jlelli/linux.git
git remote update jlelli
git checkout c9d6e71fba18dbb45f311d8297b75a30e4618612
vim +/inactive_task_timer +1451 kernel/sched/deadline.c
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1401
209a0cbda7a01d2 Luca Abeni 2017-05-18 1402 static enum hrtimer_restart inactive_task_timer(struct hrtimer *timer)
209a0cbda7a01d2 Luca Abeni 2017-05-18 1403 {
209a0cbda7a01d2 Luca Abeni 2017-05-18 1404 struct sched_dl_entity *dl_se = container_of(timer,
209a0cbda7a01d2 Luca Abeni 2017-05-18 1405 struct sched_dl_entity,
209a0cbda7a01d2 Luca Abeni 2017-05-18 1406 inactive_timer);
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1407 struct task_struct *p = NULL;
209a0cbda7a01d2 Luca Abeni 2017-05-18 1408 struct rq_flags rf;
209a0cbda7a01d2 Luca Abeni 2017-05-18 1409 struct rq *rq;
209a0cbda7a01d2 Luca Abeni 2017-05-18 1410
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1411 if (!dl_server(dl_se)) {
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1412 p = dl_task_of(dl_se);
209a0cbda7a01d2 Luca Abeni 2017-05-18 1413 rq = task_rq_lock(p, &rf);
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1414 } else {
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1415 rq = dl_se->rq;
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1416 rq_lock(rq, &rf);
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1417 }
209a0cbda7a01d2 Luca Abeni 2017-05-18 1418
ecda2b66e263dfd Juri Lelli 2018-05-30 1419 sched_clock_tick();
ecda2b66e263dfd Juri Lelli 2018-05-30 1420 update_rq_clock(rq);
ecda2b66e263dfd Juri Lelli 2018-05-30 1421
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1422 if (dl_server(dl_se))
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1423 goto no_task;
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1424
209a0cbda7a01d2 Luca Abeni 2017-05-18 1425 if (!dl_task(p) || p->state == TASK_DEAD) {
387e31300b57601 Luca Abeni 2017-05-18 1426 struct dl_bw *dl_b = dl_bw_of(task_cpu(p));
387e31300b57601 Luca Abeni 2017-05-18 1427
209a0cbda7a01d2 Luca Abeni 2017-05-18 1428 if (p->state == TASK_DEAD && dl_se->dl_non_contending) {
794a56ebd9a57db Juri Lelli 2017-12-04 1429 sub_running_bw(&p->dl, dl_rq_of_se(&p->dl));
794a56ebd9a57db Juri Lelli 2017-12-04 1430 sub_rq_bw(&p->dl, dl_rq_of_se(&p->dl));
209a0cbda7a01d2 Luca Abeni 2017-05-18 1431 dl_se->dl_non_contending = 0;
209a0cbda7a01d2 Luca Abeni 2017-05-18 1432 }
387e31300b57601 Luca Abeni 2017-05-18 1433
387e31300b57601 Luca Abeni 2017-05-18 1434 raw_spin_lock(&dl_b->lock);
8c0944cee7af552 Peter Zijlstra 2017-09-07 1435 __dl_sub(dl_b, p->dl.dl_bw, dl_bw_cpus(task_cpu(p)));
387e31300b57601 Luca Abeni 2017-05-18 1436 raw_spin_unlock(&dl_b->lock);
6a817853d43961d Peter Zijlstra 2019-07-26 1437 __dl_clear_params(dl_se);
209a0cbda7a01d2 Luca Abeni 2017-05-18 1438
209a0cbda7a01d2 Luca Abeni 2017-05-18 1439 goto unlock;
209a0cbda7a01d2 Luca Abeni 2017-05-18 1440 }
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1441
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1442 no_task:
209a0cbda7a01d2 Luca Abeni 2017-05-18 1443 if (dl_se->dl_non_contending == 0)
209a0cbda7a01d2 Luca Abeni 2017-05-18 1444 goto unlock;
209a0cbda7a01d2 Luca Abeni 2017-05-18 1445
794a56ebd9a57db Juri Lelli 2017-12-04 1446 sub_running_bw(dl_se, &rq->dl);
209a0cbda7a01d2 Luca Abeni 2017-05-18 1447 dl_se->dl_non_contending = 0;
209a0cbda7a01d2 Luca Abeni 2017-05-18 1448 unlock:
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1449
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1450 if (!dl_server(dl_se)) {
209a0cbda7a01d2 Luca Abeni 2017-05-18 @1451 task_rq_unlock(rq, p, &rf);
209a0cbda7a01d2 Luca Abeni 2017-05-18 1452 put_task_struct(p);
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1453 } else {
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1454 rq_unlock(rq, &rf);
c9d6e71fba18dbb Peter Zijlstra 2019-07-24 1455 }
209a0cbda7a01d2 Luca Abeni 2017-05-18 1456
209a0cbda7a01d2 Luca Abeni 2017-05-18 1457 return HRTIMER_NORESTART;
209a0cbda7a01d2 Luca Abeni 2017-05-18 1458 }
209a0cbda7a01d2 Luca Abeni 2017-05-18 1459
:::::: The code at line 1451 was first introduced by commit
:::::: 209a0cbda7a01d2ea32a8b631d35e873bee498e9 sched/deadline: Improve the tracking of active utilization
:::::: TO: Luca Abeni <luca.abeni(a)santannapisa.it>
:::::: CC: Ingo Molnar <mingo(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[gfs2:for-next.bob6b 5/12] fs/gfs2/meta_io.c:362:27: sparse: sparse: context imbalance in 'gfs2_remove_from_journal' - different lock contexts for basic block
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: cluster-devel(a)redhat.com
TO: Bob Peterson <rpeterso(a)redhat.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git for-next.bob6b
head: 8aef3eb9d3f560027f23e9690d0eca9427ba520d
commit: 338462527fad3a08cda656c2cc2f44d9ae319e42 [5/12] gfs2: Wipe jdata and ail1 in gfs2_journal_wipe, formerly gfs2_meta_wipe
:::::: branch date: 10 hours ago
:::::: commit date: 10 hours ago
config: xtensa-randconfig-s032-20200731 (attached as .config)
compiler: xtensa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-115-g5fc204f2-dirty
git checkout 338462527fad3a08cda656c2cc2f44d9ae319e42
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=xtensa
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> fs/gfs2/meta_io.c:362:27: sparse: sparse: context imbalance in 'gfs2_remove_from_journal' - different lock contexts for basic block
# https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git/commi...
git remote add gfs2 https://git.kernel.org/pub/scm/linux/kernel/git/gfs2/linux-gfs2.git
git remote update gfs2
git checkout 338462527fad3a08cda656c2cc2f44d9ae319e42
vim +/gfs2_remove_from_journal +362 fs/gfs2/meta_io.c
b3b94faa5fe5968 David Teigland 2006-01-16 329
338462527fad3a0 Bob Peterson 2020-07-22 330 void gfs2_remove_from_journal(struct buffer_head *bh, int meta, int lock_ail)
b3b94faa5fe5968 David Teigland 2006-01-16 331 {
009d851837ab26c Steven Whitehouse 2009-12-08 332 struct address_space *mapping = bh->b_page->mapping;
009d851837ab26c Steven Whitehouse 2009-12-08 333 struct gfs2_sbd *sdp = gfs2_mapping2sbd(mapping);
16615be18cadf53 Steven Whitehouse 2007-09-17 334 struct gfs2_bufdata *bd = bh->b_private;
68cd4ce2caf22a8 Bob Peterson 2016-05-02 335 struct gfs2_trans *tr = current->journal_info;
502be2a32f09f38 Bob Peterson 2013-12-13 336 int was_pinned = 0;
009d851837ab26c Steven Whitehouse 2009-12-08 337
b3b94faa5fe5968 David Teigland 2006-01-16 338 if (test_clear_buffer_pinned(bh)) {
627c10b7e471b5d Steven Whitehouse 2011-04-14 339 trace_gfs2_pin(bd, 0);
5e687eac1bd31ba Benjamin Marzinski 2010-05-04 340 atomic_dec(&sdp->sd_log_pinned);
c0752aa7e4d48cc Bob Peterson 2012-05-01 341 list_del_init(&bd->bd_list);
68cd4ce2caf22a8 Bob Peterson 2016-05-02 342 if (meta == REMOVE_META)
5c676f6d359b040 Steven Whitehouse 2006-02-27 343 tr->tr_num_buf_rm++;
022ef4feed0c648 Steven Whitehouse 2014-02-21 344 else
16615be18cadf53 Steven Whitehouse 2007-09-17 345 tr->tr_num_databuf_rm++;
9862ca056e65463 Bob Peterson 2017-01-25 346 set_bit(TR_TOUCHED, &tr->tr_flags);
502be2a32f09f38 Bob Peterson 2013-12-13 347 was_pinned = 1;
b3b94faa5fe5968 David Teigland 2006-01-16 348 brelse(bh);
b3b94faa5fe5968 David Teigland 2006-01-16 349 }
b3b94faa5fe5968 David Teigland 2006-01-16 350 if (bd) {
338462527fad3a0 Bob Peterson 2020-07-22 351 if (lock_ail)
c618e87a5fd02aa Steven Whitehouse 2011-03-14 352 spin_lock(&sdp->sd_ail_lock);
16ca9412d801818 Benjamin Marzinski 2013-04-05 353 if (bd->bd_tr) {
1ad38c437fa33f8 Steven Whitehouse 2007-09-03 354 gfs2_trans_add_revoke(sdp, bd);
502be2a32f09f38 Bob Peterson 2013-12-13 355 } else if (was_pinned) {
502be2a32f09f38 Bob Peterson 2013-12-13 356 bh->b_private = NULL;
502be2a32f09f38 Bob Peterson 2013-12-13 357 kmem_cache_free(gfs2_bufdata_cachep, bd);
1ad38c437fa33f8 Steven Whitehouse 2007-09-03 358 }
338462527fad3a0 Bob Peterson 2020-07-22 359 if (lock_ail)
c618e87a5fd02aa Steven Whitehouse 2011-03-14 360 spin_unlock(&sdp->sd_ail_lock);
b3b94faa5fe5968 David Teigland 2006-01-16 361 }
b3b94faa5fe5968 David Teigland 2006-01-16 @362 clear_buffer_dirty(bh);
b3b94faa5fe5968 David Teigland 2006-01-16 363 clear_buffer_uptodate(bh);
16615be18cadf53 Steven Whitehouse 2007-09-17 364 }
16615be18cadf53 Steven Whitehouse 2007-09-17 365
:::::: The code at line 362 was first introduced by commit
:::::: b3b94faa5fe5968827ba0640ee9fba4b3e7f736e [GFS2] The core of GFS2
:::::: TO: David Teigland <teigland(a)redhat.com>
:::::: CC: Steven Whitehouse <swhiteho(a)redhat.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
drivers/mtd/spi-nor/core.c:1550 spi_nor_get_min_prot_length_sr() warn: should 'nor->info->sector_size << (bp_slots_needed - bp_slots)' be a 64 bit
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Jungseung Lee <js07.lee(a)samsung.com>
CC: Tudor Ambarus <tudor.ambarus(a)microchip.com>
CC: Michael Walle <michael(a)walle.cc>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: deacdb3e3979979016fcd0ffd518c320a62ad166
commit: 2d284768b49bcf1c643c08a201ff2161041178ef mtd: spi-nor: Add generic formula for SR block protection handling
date: 4 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 4 months ago
config: h8300-randconfig-m031-20200731 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/mtd/spi-nor/core.c:1550 spi_nor_get_min_prot_length_sr() warn: should 'nor->info->sector_size << (bp_slots_needed - bp_slots)' be a 64 bit type?
Old smatch warnings:
drivers/mtd/spi-nor/core.c:1356 spi_nor_init_erase_cmd_list() warn: passing a valid pointer to 'PTR_ERR'
drivers/mtd/spi-nor/core.c:1369 spi_nor_init_erase_cmd_list() warn: passing a valid pointer to 'PTR_ERR'
# 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 2d284768b49bcf1c643c08a201ff2161041178ef
vim +1550 drivers/mtd/spi-nor/core.c
b199489d37b21c5 drivers/mtd/spi-nor/spi-nor.c Huang Shijie 2014-02-24 1538
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1539 static u64 spi_nor_get_min_prot_length_sr(struct spi_nor *nor)
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1540 {
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1541 unsigned int bp_slots, bp_slots_needed;
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1542 u8 mask = SR_BP2 | SR_BP1 | SR_BP0;
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1543
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1544 /* Reserved one for "protect none" and one for "protect all". */
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1545 bp_slots = (mask >> SR_BP_SHIFT) + 1 - 2;
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1546 bp_slots_needed = ilog2(nor->info->n_sectors);
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1547
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1548 if (bp_slots_needed > bp_slots)
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1549 return nor->info->sector_size <<
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 @1550 (bp_slots_needed - bp_slots);
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1551 else
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1552 return nor->info->sector_size;
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1553 }
2d284768b49bcf1 drivers/mtd/spi-nor/core.c Jungseung Lee 2020-03-18 1554
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
drivers/net/wireless/mac80211_hwsim.c:4079 hwsim_virtio_rx_work() error: double unlocked 'hwsim_virtio_lock' (orig line 4058)
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Erel Geron <erelx.geron(a)intel.com>
CC: Johannes Berg <johannes.berg(a)intel.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: deacdb3e3979979016fcd0ffd518c320a62ad166
commit: 5d44fe7c9808c56e136e59147bd932f5491520f1 mac80211_hwsim: add frame transmission support over virtio
date: 4 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 4 months ago
config: h8300-randconfig-m031-20200731 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/net/wireless/mac80211_hwsim.c:4079 hwsim_virtio_rx_work() error: double unlocked 'hwsim_virtio_lock' (orig line 4058)
drivers/net/wireless/mac80211_hwsim.c:4163 hwsim_virtio_probe() error: double unlocked 'hwsim_virtio_lock' (orig line 4151)
# 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 5d44fe7c9808c56e136e59147bd932f5491520f1
vim +/hwsim_virtio_lock +4079 drivers/net/wireless/mac80211_hwsim.c
5d44fe7c9808c56 Erel Geron 2020-03-05 4041
5d44fe7c9808c56 Erel Geron 2020-03-05 4042 static void hwsim_virtio_rx_work(struct work_struct *work)
5d44fe7c9808c56 Erel Geron 2020-03-05 4043 {
5d44fe7c9808c56 Erel Geron 2020-03-05 4044 struct virtqueue *vq;
5d44fe7c9808c56 Erel Geron 2020-03-05 4045 unsigned int len;
5d44fe7c9808c56 Erel Geron 2020-03-05 4046 struct sk_buff *skb;
5d44fe7c9808c56 Erel Geron 2020-03-05 4047 struct scatterlist sg[1];
5d44fe7c9808c56 Erel Geron 2020-03-05 4048 int err;
5d44fe7c9808c56 Erel Geron 2020-03-05 4049 unsigned long flags;
5d44fe7c9808c56 Erel Geron 2020-03-05 4050
5d44fe7c9808c56 Erel Geron 2020-03-05 4051 spin_lock_irqsave(&hwsim_virtio_lock, flags);
5d44fe7c9808c56 Erel Geron 2020-03-05 4052 if (!hwsim_virtio_enabled)
5d44fe7c9808c56 Erel Geron 2020-03-05 4053 goto out_unlock;
5d44fe7c9808c56 Erel Geron 2020-03-05 4054
5d44fe7c9808c56 Erel Geron 2020-03-05 4055 skb = virtqueue_get_buf(hwsim_vqs[HWSIM_VQ_RX], &len);
5d44fe7c9808c56 Erel Geron 2020-03-05 4056 if (!skb)
5d44fe7c9808c56 Erel Geron 2020-03-05 4057 goto out_unlock;
5d44fe7c9808c56 Erel Geron 2020-03-05 @4058 spin_unlock_irqrestore(&hwsim_virtio_lock, flags);
5d44fe7c9808c56 Erel Geron 2020-03-05 4059
5d44fe7c9808c56 Erel Geron 2020-03-05 4060 skb->data = skb->head;
5d44fe7c9808c56 Erel Geron 2020-03-05 4061 skb_set_tail_pointer(skb, len);
5d44fe7c9808c56 Erel Geron 2020-03-05 4062 hwsim_virtio_handle_cmd(skb);
5d44fe7c9808c56 Erel Geron 2020-03-05 4063
5d44fe7c9808c56 Erel Geron 2020-03-05 4064 spin_lock_irqsave(&hwsim_virtio_lock, flags);
5d44fe7c9808c56 Erel Geron 2020-03-05 4065 if (!hwsim_virtio_enabled) {
5d44fe7c9808c56 Erel Geron 2020-03-05 4066 nlmsg_free(skb);
5d44fe7c9808c56 Erel Geron 2020-03-05 4067 goto out_unlock;
5d44fe7c9808c56 Erel Geron 2020-03-05 4068 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4069 vq = hwsim_vqs[HWSIM_VQ_RX];
5d44fe7c9808c56 Erel Geron 2020-03-05 4070 sg_init_one(sg, skb->head, skb_end_offset(skb));
5d44fe7c9808c56 Erel Geron 2020-03-05 4071 err = virtqueue_add_inbuf(vq, sg, 1, skb, GFP_KERNEL);
5d44fe7c9808c56 Erel Geron 2020-03-05 4072 if (WARN(err, "virtqueue_add_inbuf returned %d\n", err))
5d44fe7c9808c56 Erel Geron 2020-03-05 4073 nlmsg_free(skb);
5d44fe7c9808c56 Erel Geron 2020-03-05 4074 else
5d44fe7c9808c56 Erel Geron 2020-03-05 4075 virtqueue_kick(vq);
5d44fe7c9808c56 Erel Geron 2020-03-05 4076 schedule_work(&hwsim_virtio_rx);
5d44fe7c9808c56 Erel Geron 2020-03-05 4077
5d44fe7c9808c56 Erel Geron 2020-03-05 4078 out_unlock:
5d44fe7c9808c56 Erel Geron 2020-03-05 @4079 spin_unlock_irqrestore(&hwsim_virtio_lock, flags);
5d44fe7c9808c56 Erel Geron 2020-03-05 4080 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4081
5d44fe7c9808c56 Erel Geron 2020-03-05 4082 static void hwsim_virtio_rx_done(struct virtqueue *vq)
5d44fe7c9808c56 Erel Geron 2020-03-05 4083 {
5d44fe7c9808c56 Erel Geron 2020-03-05 4084 schedule_work(&hwsim_virtio_rx);
5d44fe7c9808c56 Erel Geron 2020-03-05 4085 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4086
5d44fe7c9808c56 Erel Geron 2020-03-05 4087 static int init_vqs(struct virtio_device *vdev)
5d44fe7c9808c56 Erel Geron 2020-03-05 4088 {
5d44fe7c9808c56 Erel Geron 2020-03-05 4089 vq_callback_t *callbacks[HWSIM_NUM_VQS] = {
5d44fe7c9808c56 Erel Geron 2020-03-05 4090 [HWSIM_VQ_TX] = hwsim_virtio_tx_done,
5d44fe7c9808c56 Erel Geron 2020-03-05 4091 [HWSIM_VQ_RX] = hwsim_virtio_rx_done,
5d44fe7c9808c56 Erel Geron 2020-03-05 4092 };
5d44fe7c9808c56 Erel Geron 2020-03-05 4093 const char *names[HWSIM_NUM_VQS] = {
5d44fe7c9808c56 Erel Geron 2020-03-05 4094 [HWSIM_VQ_TX] = "tx",
5d44fe7c9808c56 Erel Geron 2020-03-05 4095 [HWSIM_VQ_RX] = "rx",
5d44fe7c9808c56 Erel Geron 2020-03-05 4096 };
5d44fe7c9808c56 Erel Geron 2020-03-05 4097
5d44fe7c9808c56 Erel Geron 2020-03-05 4098 return virtio_find_vqs(vdev, HWSIM_NUM_VQS,
5d44fe7c9808c56 Erel Geron 2020-03-05 4099 hwsim_vqs, callbacks, names, NULL);
5d44fe7c9808c56 Erel Geron 2020-03-05 4100 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4101
5d44fe7c9808c56 Erel Geron 2020-03-05 4102 static int fill_vq(struct virtqueue *vq)
5d44fe7c9808c56 Erel Geron 2020-03-05 4103 {
5d44fe7c9808c56 Erel Geron 2020-03-05 4104 int i, err;
5d44fe7c9808c56 Erel Geron 2020-03-05 4105 struct sk_buff *skb;
5d44fe7c9808c56 Erel Geron 2020-03-05 4106 struct scatterlist sg[1];
5d44fe7c9808c56 Erel Geron 2020-03-05 4107
5d44fe7c9808c56 Erel Geron 2020-03-05 4108 for (i = 0; i < virtqueue_get_vring_size(vq); i++) {
5d44fe7c9808c56 Erel Geron 2020-03-05 4109 skb = genlmsg_new(GENLMSG_DEFAULT_SIZE, GFP_KERNEL);
5d44fe7c9808c56 Erel Geron 2020-03-05 4110 if (!skb)
5d44fe7c9808c56 Erel Geron 2020-03-05 4111 return -ENOMEM;
5d44fe7c9808c56 Erel Geron 2020-03-05 4112
5d44fe7c9808c56 Erel Geron 2020-03-05 4113 sg_init_one(sg, skb->head, skb_end_offset(skb));
5d44fe7c9808c56 Erel Geron 2020-03-05 4114 err = virtqueue_add_inbuf(vq, sg, 1, skb, GFP_KERNEL);
5d44fe7c9808c56 Erel Geron 2020-03-05 4115 if (err) {
5d44fe7c9808c56 Erel Geron 2020-03-05 4116 nlmsg_free(skb);
5d44fe7c9808c56 Erel Geron 2020-03-05 4117 return err;
5d44fe7c9808c56 Erel Geron 2020-03-05 4118 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4119 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4120 virtqueue_kick(vq);
5d44fe7c9808c56 Erel Geron 2020-03-05 4121 return 0;
5d44fe7c9808c56 Erel Geron 2020-03-05 4122 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4123
5d44fe7c9808c56 Erel Geron 2020-03-05 4124 static void remove_vqs(struct virtio_device *vdev)
5d44fe7c9808c56 Erel Geron 2020-03-05 4125 {
5d44fe7c9808c56 Erel Geron 2020-03-05 4126 int i;
5d44fe7c9808c56 Erel Geron 2020-03-05 4127
5d44fe7c9808c56 Erel Geron 2020-03-05 4128 vdev->config->reset(vdev);
5d44fe7c9808c56 Erel Geron 2020-03-05 4129
5d44fe7c9808c56 Erel Geron 2020-03-05 4130 for (i = 0; i < ARRAY_SIZE(hwsim_vqs); i++) {
5d44fe7c9808c56 Erel Geron 2020-03-05 4131 struct virtqueue *vq = hwsim_vqs[i];
5d44fe7c9808c56 Erel Geron 2020-03-05 4132 struct sk_buff *skb;
5d44fe7c9808c56 Erel Geron 2020-03-05 4133
5d44fe7c9808c56 Erel Geron 2020-03-05 4134 while ((skb = virtqueue_detach_unused_buf(vq)))
5d44fe7c9808c56 Erel Geron 2020-03-05 4135 nlmsg_free(skb);
5d44fe7c9808c56 Erel Geron 2020-03-05 4136 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4137
5d44fe7c9808c56 Erel Geron 2020-03-05 4138 vdev->config->del_vqs(vdev);
5d44fe7c9808c56 Erel Geron 2020-03-05 4139 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4140
5d44fe7c9808c56 Erel Geron 2020-03-05 4141 static int hwsim_virtio_probe(struct virtio_device *vdev)
5d44fe7c9808c56 Erel Geron 2020-03-05 4142 {
5d44fe7c9808c56 Erel Geron 2020-03-05 4143 int err;
5d44fe7c9808c56 Erel Geron 2020-03-05 4144 unsigned long flags;
5d44fe7c9808c56 Erel Geron 2020-03-05 4145
5d44fe7c9808c56 Erel Geron 2020-03-05 4146 spin_lock_irqsave(&hwsim_virtio_lock, flags);
5d44fe7c9808c56 Erel Geron 2020-03-05 4147 if (hwsim_virtio_enabled) {
5d44fe7c9808c56 Erel Geron 2020-03-05 4148 spin_unlock_irqrestore(&hwsim_virtio_lock, flags);
5d44fe7c9808c56 Erel Geron 2020-03-05 4149 return -EEXIST;
5d44fe7c9808c56 Erel Geron 2020-03-05 4150 }
5d44fe7c9808c56 Erel Geron 2020-03-05 @4151 spin_unlock_irqrestore(&hwsim_virtio_lock, flags);
5d44fe7c9808c56 Erel Geron 2020-03-05 4152
5d44fe7c9808c56 Erel Geron 2020-03-05 4153 err = init_vqs(vdev);
5d44fe7c9808c56 Erel Geron 2020-03-05 4154 if (err)
5d44fe7c9808c56 Erel Geron 2020-03-05 4155 return err;
5d44fe7c9808c56 Erel Geron 2020-03-05 4156
5d44fe7c9808c56 Erel Geron 2020-03-05 4157 err = fill_vq(hwsim_vqs[HWSIM_VQ_RX]);
5d44fe7c9808c56 Erel Geron 2020-03-05 4158 if (err)
5d44fe7c9808c56 Erel Geron 2020-03-05 4159 goto out_remove;
5d44fe7c9808c56 Erel Geron 2020-03-05 4160
5d44fe7c9808c56 Erel Geron 2020-03-05 4161 spin_lock_irqsave(&hwsim_virtio_lock, flags);
5d44fe7c9808c56 Erel Geron 2020-03-05 4162 hwsim_virtio_enabled = true;
5d44fe7c9808c56 Erel Geron 2020-03-05 @4163 spin_unlock_irqrestore(&hwsim_virtio_lock, flags);
5d44fe7c9808c56 Erel Geron 2020-03-05 4164
5d44fe7c9808c56 Erel Geron 2020-03-05 4165 schedule_work(&hwsim_virtio_rx);
5d44fe7c9808c56 Erel Geron 2020-03-05 4166 return 0;
5d44fe7c9808c56 Erel Geron 2020-03-05 4167
5d44fe7c9808c56 Erel Geron 2020-03-05 4168 out_remove:
5d44fe7c9808c56 Erel Geron 2020-03-05 4169 remove_vqs(vdev);
5d44fe7c9808c56 Erel Geron 2020-03-05 4170 return err;
5d44fe7c9808c56 Erel Geron 2020-03-05 4171 }
5d44fe7c9808c56 Erel Geron 2020-03-05 4172
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[linux-next:master 2699/13260] drivers/net/wireless/microchip/wilc1000/hif.c:1410 wilc_get_stats_async() warn: passing a valid pointer to 'PTR_ERR'
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Ajay Singh <ajay.kathat(a)microchip.com>
CC: Kalle Valo <kvalo(a)codeaurora.org>
Hi Ajay,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 01830e6c042e8eb6eb202e05d7df8057135b4c26
commit: 5625f965d7644b4dc6a71d74021cfe093ad34eea [2699/13260] wilc1000: move wilc driver out of staging
:::::: branch date: 8 hours ago
:::::: commit date: 5 weeks ago
config: h8300-randconfig-m031-20200731 (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/net/wireless/microchip/wilc1000/hif.c:1410 wilc_get_stats_async() warn: passing a valid pointer to 'PTR_ERR'
drivers/net/wireless/microchip/wilc1000/hif.c:1925 wilc_setup_multicast_filter() warn: passing a valid pointer to 'PTR_ERR'
drivers/net/wireless/microchip/wilc1000/wlan.c:528 wilc_wlan_handle_txq() error: double unlocked 'wilc->txq_spinlock' (orig line 500)
drivers/net/wireless/microchip/wilc1000/wlan.c:528 wilc_wlan_handle_txq() error: double unlocked 'wilc->txq_spinlock' (orig line 500)
fs/xfs/libxfs/xfs_bmap.c:5847 xfs_bmap_collapse_extents() warn: Function too hairy. No more merges.
Old smatch warnings:
fs/xfs/libxfs/xfs_bmap.c:372 xfs_bmap_check_leaf_extents() error: we previously assumed 'bp' could be null (see line 364)
fs/xfs/libxfs/xfs_bmap.c:6128 __xfs_bmap_add() error: potential null dereference 'bi'. (kmem_alloc returns null)
# 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 5625f965d7644b4dc6a71d74021cfe093ad34eea
vim +/PTR_ERR +1410 drivers/net/wireless/microchip/wilc1000/hif.c
c5c77ba18ea66aa drivers/staging/wilc1000/host_interface.c Johnny Kim 2015-05-11 1402
2f6fa4ca37c57e5 drivers/staging/wilc1000/host_interface.c Marko Stankovic 2018-12-25 1403 static int wilc_get_stats_async(struct wilc_vif *vif, struct rf_info *stats)
c5c77ba18ea66aa drivers/staging/wilc1000/host_interface.c Johnny Kim 2015-05-11 1404 {
d241877a1aca7e4 drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-07-19 1405 int result;
ff52a57a7a4237a drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-06-26 1406 struct host_if_msg *msg;
ff52a57a7a4237a drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-06-26 1407
19cb25e1e6a9061 drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-12-02 1408 msg = wilc_alloc_work(vif, handle_get_statistics, false);
ff52a57a7a4237a drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-06-26 1409 if (IS_ERR(msg))
ff52a57a7a4237a drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-06-26 @1410 return PTR_ERR(msg);
c5c77ba18ea66aa drivers/staging/wilc1000/host_interface.c Johnny Kim 2015-05-11 1411
ff52a57a7a4237a drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-06-26 1412 msg->body.data = (char *)stats;
ae4dfa572a7e67f drivers/staging/wilc1000/host_interface.c Leo Kim 2015-10-13 1413
c6a358d56476274 drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-06-26 1414 result = wilc_enqueue_work(msg);
31390eec7dce636 drivers/staging/wilc1000/host_interface.c Leo Kim 2015-10-19 1415 if (result) {
a120adb8b6eddc1 drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-07-29 1416 netdev_err(vif->ndev, "%s: enqueue work failed\n", __func__);
ff52a57a7a4237a drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-06-26 1417 kfree(msg);
ff52a57a7a4237a drivers/staging/wilc1000/host_interface.c Ajay Singh 2018-06-26 1418 return result;
c5c77ba18ea66aa drivers/staging/wilc1000/host_interface.c Johnny Kim 2015-05-11 1419 }
c5c77ba18ea66aa drivers/staging/wilc1000/host_interface.c Johnny Kim 2015-05-11 1420
31390eec7dce636 drivers/staging/wilc1000/host_interface.c Leo Kim 2015-10-19 1421 return result;
c5c77ba18ea66aa drivers/staging/wilc1000/host_interface.c Johnny Kim 2015-05-11 1422 }
c5c77ba18ea66aa drivers/staging/wilc1000/host_interface.c Johnny Kim 2015-05-11 1423
:::::: The code at line 1410 was first introduced by commit
:::::: ff52a57a7a4237ad5e089d32c7d621a68f4a7610 staging: wilc1000: move the allocation of cmd out of wilc_enqueue_cmd()
:::::: TO: Ajay Singh <ajay.kathat(a)microchip.com>
:::::: CC: Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
arch/parisc/include/asm/spinlock.h:153:23: sparse: sparse: context imbalance in '_raw_write_unlock' - unexpected unlock
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Helge Deller <deller(a)gmx.de>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: d8b9faec54ae4bc2fff68bcd0befa93ace8256ce
commit: fbdc8f0f4891df7b5eb643ec0a509a4ac7dcfc2e parisc: Rework arch_rw locking functions
date: 4 months ago
:::::: branch date: 9 hours ago
:::::: commit date: 4 months ago
config: parisc-randconfig-s032-20200731 (attached as .config)
compiler: hppa-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-115-g5fc204f2-dirty
git checkout fbdc8f0f4891df7b5eb643ec0a509a4ac7dcfc2e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=parisc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
kernel/locking/spinlock.c:126:1: sparse: sparse: symbol '__raw_spin_lock' was not declared. Should it be static?
kernel/locking/spinlock.c:126:1: sparse: sparse: symbol '__raw_spin_lock_irqsave' was not declared. Should it be static?
kernel/locking/spinlock.c:126:1: sparse: sparse: symbol '__raw_spin_lock_irq' was not declared. Should it be static?
kernel/locking/spinlock.c:126:1: sparse: sparse: symbol '__raw_spin_lock_bh' was not declared. Should it be static?
kernel/locking/spinlock.c:127:1: sparse: sparse: symbol '__raw_read_lock' was not declared. Should it be static?
kernel/locking/spinlock.c:127:1: sparse: sparse: symbol '__raw_read_lock_irqsave' was not declared. Should it be static?
kernel/locking/spinlock.c:127:1: sparse: sparse: symbol '__raw_read_lock_irq' was not declared. Should it be static?
kernel/locking/spinlock.c:127:1: sparse: sparse: symbol '__raw_read_lock_bh' was not declared. Should it be static?
kernel/locking/spinlock.c:128:1: sparse: sparse: symbol '__raw_write_lock' was not declared. Should it be static?
kernel/locking/spinlock.c:128:1: sparse: sparse: symbol '__raw_write_lock_irqsave' was not declared. Should it be static?
kernel/locking/spinlock.c:128:1: sparse: sparse: symbol '__raw_write_lock_irq' was not declared. Should it be static?
kernel/locking/spinlock.c:128:1: sparse: sparse: symbol '__raw_write_lock_bh' was not declared. Should it be static?
kernel/locking/spinlock.c:126:1: sparse: sparse: context imbalance in '__raw_spin_lock_irq' - wrong count at exit
kernel/locking/spinlock.c:126:1: sparse: sparse: context imbalance in '__raw_spin_lock_bh' - wrong count at exit
kernel/locking/spinlock.c:127:1: sparse: sparse: context imbalance in '__raw_read_lock_irq' - wrong count at exit
kernel/locking/spinlock.c:127:1: sparse: sparse: context imbalance in '__raw_read_lock_bh' - wrong count at exit
kernel/locking/spinlock.c:128:1: sparse: sparse: context imbalance in '__raw_write_lock_irq' - wrong count at exit
kernel/locking/spinlock.c:128:1: sparse: sparse: context imbalance in '__raw_write_lock_bh' - wrong count at exit
kernel/locking/spinlock.c:181:17: sparse: sparse: context imbalance in '_raw_spin_unlock' - unexpected unlock
kernel/locking/spinlock.c:189:17: sparse: sparse: context imbalance in '_raw_spin_unlock_irqrestore' - unexpected unlock
kernel/locking/spinlock.c:197:17: sparse: sparse: context imbalance in '_raw_spin_unlock_irq' - unexpected unlock
kernel/locking/spinlock.c:205:17: sparse: sparse: context imbalance in '_raw_spin_unlock_bh' - unexpected unlock
kernel/locking/spinlock.c: note: in included file (through arch/parisc/include/asm/atomic.h, include/linux/atomic.h, arch/parisc/include/asm/bitops.h, ...):
arch/parisc/include/asm/spinlock.h:142:23: sparse: sparse: context imbalance in '_raw_read_unlock' - unexpected unlock
arch/parisc/include/asm/spinlock.h:142:23: sparse: sparse: context imbalance in '_raw_read_unlock_irqrestore' - unexpected unlock
arch/parisc/include/asm/spinlock.h:142:23: sparse: sparse: context imbalance in '_raw_read_unlock_irq' - unexpected unlock
arch/parisc/include/asm/spinlock.h:142:23: sparse: sparse: context imbalance in '_raw_read_unlock_bh' - unexpected unlock
>> arch/parisc/include/asm/spinlock.h:153:23: sparse: sparse: context imbalance in '_raw_write_unlock' - unexpected unlock
arch/parisc/include/asm/spinlock.h:153:23: sparse: sparse: context imbalance in '_raw_write_unlock_irqrestore' - unexpected unlock
>> arch/parisc/include/asm/spinlock.h:153:23: sparse: sparse: context imbalance in '_raw_write_unlock_irq' - unexpected unlock
arch/parisc/include/asm/spinlock.h:153:23: sparse: sparse: context imbalance in '_raw_write_unlock_bh' - unexpected unlock
# 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 fbdc8f0f4891df7b5eb643ec0a509a4ac7dcfc2e
vim +/_raw_write_unlock +153 arch/parisc/include/asm/spinlock.h
^1da177e4c3f41 include/asm-parisc/spinlock.h Linus Torvalds 2005-04-16 147
fbdc8f0f4891df arch/parisc/include/asm/spinlock.h Helge Deller 2020-04-05 148 static inline void arch_write_unlock(arch_rwlock_t *rw)
fbdc8f0f4891df arch/parisc/include/asm/spinlock.h Helge Deller 2020-04-05 149 {
fbdc8f0f4891df arch/parisc/include/asm/spinlock.h Helge Deller 2020-04-05 150 unsigned long flags;
fbdc8f0f4891df arch/parisc/include/asm/spinlock.h Helge Deller 2020-04-05 151
fbdc8f0f4891df arch/parisc/include/asm/spinlock.h Helge Deller 2020-04-05 152 local_irq_save(flags);
fbdc8f0f4891df arch/parisc/include/asm/spinlock.h Helge Deller 2020-04-05 @153 arch_spin_lock(&(rw->lock_mutex));
fbdc8f0f4891df arch/parisc/include/asm/spinlock.h Helge Deller 2020-04-05 154 rw->counter = __ARCH_RW_LOCK_UNLOCKED__;
fbdc8f0f4891df arch/parisc/include/asm/spinlock.h Helge Deller 2020-04-05 155 arch_spin_unlock(&(rw->lock_mutex));
fbdc8f0f4891df arch/parisc/include/asm/spinlock.h Helge Deller 2020-04-05 156 local_irq_restore(flags);
^1da177e4c3f41 include/asm-parisc/spinlock.h Linus Torvalds 2005-04-16 157 }
^1da177e4c3f41 include/asm-parisc/spinlock.h Linus Torvalds 2005-04-16 158
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[saeed:net-mlx5 21/21] drivers/net/ethernet/mellanox/mlx5/core/health.c:210:2-8: preceding lock on line 208
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Shay Drory <shayd(a)mellanox.com>
CC: Saeed Mahameed <saeedm(a)mellanox.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git net-mlx5
head: fbe5105a9bbbd391ec318b69e9308be883af8e9c
commit: fbe5105a9bbbd391ec318b69e9308be883af8e9c [21/21] net/mlx5: Don't allow health work when device is uninitialized
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
config: i386-randconfig-c001-20200731 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/net/ethernet/mellanox/mlx5/core/health.c:210:2-8: preceding lock on line 208
# https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git/commit/?i...
git remote add saeed https://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux.git
git remote update saeed
git checkout fbe5105a9bbbd391ec318b69e9308be883af8e9c
vim +210 drivers/net/ethernet/mellanox/mlx5/core/health.c
fbe5105a9bbbd3 Shay Drory 2020-07-14 197
8812c24d28f497 Majd Dibbiny 2017-02-09 198 void mlx5_enter_error_state(struct mlx5_core_dev *dev, bool force)
89d44f0a6c732d Majd Dibbiny 2015-10-14 199 {
b6e0b6bebe0732 Shay Drory 2020-05-07 200 bool err_detected = false;
b6e0b6bebe0732 Shay Drory 2020-05-07 201
b6e0b6bebe0732 Shay Drory 2020-05-07 202 /* Mark the device as fatal in order to abort FW commands */
b6e0b6bebe0732 Shay Drory 2020-05-07 203 if ((check_fatal_sensors(dev) || force) &&
b6e0b6bebe0732 Shay Drory 2020-05-07 204 dev->state == MLX5_DEVICE_STATE_UP) {
b6e0b6bebe0732 Shay Drory 2020-05-07 205 dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
b6e0b6bebe0732 Shay Drory 2020-05-07 206 err_detected = true;
b6e0b6bebe0732 Shay Drory 2020-05-07 207 }
c1d4d2e92ad670 Mohamad Haj Yahia 2016-06-30 @208 mutex_lock(&dev->intf_state_mutex);
fbe5105a9bbbd3 Shay Drory 2020-07-14 209 if (!mlx5_is_device_initialized(dev))
fbe5105a9bbbd3 Shay Drory 2020-07-14 @210 return;
fbe5105a9bbbd3 Shay Drory 2020-07-14 211
b6e0b6bebe0732 Shay Drory 2020-05-07 212 if (!err_detected && dev->state == MLX5_DEVICE_STATE_INTERNAL_ERROR)
b6e0b6bebe0732 Shay Drory 2020-05-07 213 goto unlock;/* a previous error is still being handled */
3e5b72ac2f2984 Feras Daoud 2018-11-12 214 if (dev->state == MLX5_DEVICE_STATE_UNINITIALIZED) {
3e5b72ac2f2984 Feras Daoud 2018-11-12 215 dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
3e5b72ac2f2984 Feras Daoud 2018-11-12 216 goto unlock;
3e5b72ac2f2984 Feras Daoud 2018-11-12 217 }
89d44f0a6c732d Majd Dibbiny 2015-10-14 218
b6e0b6bebe0732 Shay Drory 2020-05-07 219 if (check_fatal_sensors(dev) || force) { /* protected state setting */
89d44f0a6c732d Majd Dibbiny 2015-10-14 220 dev->state = MLX5_DEVICE_STATE_INTERNAL_ERROR;
4cab346bcf74f4 Huy Nguyen 2019-02-07 221 mlx5_cmd_flush(dev);
c1d4d2e92ad670 Mohamad Haj Yahia 2016-06-30 222 }
89d44f0a6c732d Majd Dibbiny 2015-10-14 223
02039fb659b366 Saeed Mahameed 2018-11-26 224 mlx5_notifier_call_chain(dev->priv.events, MLX5_DEV_EVENT_SYS_ERROR, (void *)1);
3e5b72ac2f2984 Feras Daoud 2018-11-12 225 unlock:
3e5b72ac2f2984 Feras Daoud 2018-11-12 226 mutex_unlock(&dev->intf_state_mutex);
3e5b72ac2f2984 Feras Daoud 2018-11-12 227 }
3e5b72ac2f2984 Feras Daoud 2018-11-12 228
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
drivers/infiniband/hw/mlx5/mr.c:232:3-9: preceding lock on line 240
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Jason Gunthorpe <jgg(a)mellanox.com>
CC: Leon Romanovsky <leonro(a)mellanox.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: e2c46b5762c616c249201688d3b9846627f78d2c
commit: a1d8854aae4ee19df6161a276a99d3c9c2abc4f3 RDMA/mlx5: Fix MR cache size and limit debugfs
date: 5 months ago
:::::: branch date: 5 hours ago
:::::: commit date: 5 months ago
config: i386-randconfig-c001-20200730 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/infiniband/hw/mlx5/mr.c:232:3-9: preceding lock on line 240
drivers/infiniband/hw/mlx5/mr.c:232:3-9: preceding lock on line 249
drivers/infiniband/hw/mlx5/mr.c:243:5-11: preceding lock on line 240
# 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 a1d8854aae4ee19df6161a276a99d3c9c2abc4f3
vim +232 drivers/infiniband/hw/mlx5/mr.c
65edd0e758b8a21 Daniel Jurgens 2018-03-13 220
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 221 static int resize_available_mrs(struct mlx5_cache_ent *ent, unsigned int target,
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 222 bool limit_fill)
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 223 {
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 224 int err;
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 225
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 226 lockdep_assert_held(&ent->lock);
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 227
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 228 while (true) {
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 229 if (limit_fill)
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 230 target = ent->limit * 2;
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 231 if (target == ent->available_mrs + ent->pending)
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 @232 return 0;
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 233 if (target > ent->available_mrs + ent->pending) {
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 234 u32 todo = target - (ent->available_mrs + ent->pending);
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 235
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 236 spin_unlock_irq(&ent->lock);
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 237 err = add_keys(ent, todo);
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 238 if (err == -EAGAIN)
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 239 usleep_range(3000, 5000);
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 @240 spin_lock_irq(&ent->lock);
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 241 if (err) {
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 242 if (err != -EAGAIN)
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 243 return err;
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 244 } else
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 245 return 0;
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 246 } else {
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 247 spin_unlock_irq(&ent->lock);
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 248 remove_cache_mr(ent);
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 249 spin_lock_irq(&ent->lock);
a1d8854aae4ee19 Jason Gunthorpe 2020-03-10 250 }
e126ba97dba9ede Eli Cohen 2013-07-07 251 }
e126ba97dba9ede Eli Cohen 2013-07-07 252 }
e126ba97dba9ede Eli Cohen 2013-07-07 253
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[linux-next:master 11519/13035] drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4304:3-9: preceding lock on line 4293
by kernel test robot
CC: kbuild-all(a)lists.01.org
TO: Dennis Li <Dennis.Li(a)amd.com>
CC: Alex Deucher <alexander.deucher(a)amd.com>
CC: Hawking Zhang <Hawking.Zhang(a)amd.com>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 7b287a5c6ac518c415a258f2aa7b1ebb25c263d2
commit: df9c8d1aa278c435c30a69b8f2418b4a52fcb929 [11519/13035] drm/amdgpu: fix system hang issue during GPU reset
:::::: branch date: 6 hours ago
:::::: commit date: 3 days ago
config: i386-randconfig-c001-20200730 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Julia Lawall <julia.lawall(a)lip6.fr>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4304:3-9: preceding lock on line 4293
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c:4460:1-7: preceding lock on line 4293
--
>> drivers/gpu/drm/amd/amdgpu/amdgpu_xgmi.c:447:1-7: preceding lock on line 410
# 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 df9c8d1aa278c435c30a69b8f2418b4a52fcb929
vim +4304 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
3f12acc8d6d4b2 Evan Quan 2020-04-21 4236
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4237 /**
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4238 * amdgpu_device_gpu_recover - reset the asic and recover scheduler
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4239 *
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4240 * @adev: amdgpu device pointer
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4241 * @job: which job trigger hang
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4242 *
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4243 * Attempt to reset the GPU if it has hung (all asics).
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4244 * Attempt to do soft-reset or full-reset and reinitialize Asic
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4245 * Returns 0 for success or an error on failure.
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4246 */
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4247
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4248 int amdgpu_device_gpu_recover(struct amdgpu_device *adev,
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4249 struct amdgpu_job *job)
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4250 {
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4251 struct list_head device_list, *device_list_handle = NULL;
7dd8c205eaedfa Evan Quan 2020-04-16 4252 bool need_full_reset = false;
7dd8c205eaedfa Evan Quan 2020-04-16 4253 bool job_signaled = false;
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4254 struct amdgpu_hive_info *hive = NULL;
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4255 struct amdgpu_device *tmp_adev = NULL;
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4256 int i, r = 0;
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4257 bool need_emergency_restart = false;
3f12acc8d6d4b2 Evan Quan 2020-04-21 4258 bool audio_suspended = false;
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4259
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4260 /**
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4261 * Special case: RAS triggered and full reset isn't supported
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4262 */
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4263 need_emergency_restart = amdgpu_ras_need_emergency_restart(adev);
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4264
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4265 /*
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4266 * Flush RAM to disk so that after reboot
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4267 * the user can read log and see why the system rebooted.
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4268 */
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4269 if (need_emergency_restart && amdgpu_ras_get_context(adev)->reboot) {
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4270 DRM_WARN("Emergency reboot.");
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4271
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4272 ksys_sync_helper();
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4273 emergency_restart();
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4274 }
d5ea093eebf022 Andrey Grodzovsky 2019-08-22 4275
b823821f2244ad Le Ma 2019-11-27 4276 dev_info(adev->dev, "GPU %s begin!\n",
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4277 need_emergency_restart ? "jobs stop":"reset");
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4278
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4279 /*
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4280 * Here we trylock to avoid chain of resets executing from
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4281 * either trigger by jobs on different adevs in XGMI hive or jobs on
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4282 * different schedulers for same device while this TO handler is running.
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4283 * We always reset all schedulers for device and all devices for XGMI
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4284 * hive so that should take care of them too.
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4285 */
df9c8d1aa278c4 Dennis Li 2020-07-08 4286 hive = amdgpu_get_xgmi_hive(adev, false);
df9c8d1aa278c4 Dennis Li 2020-07-08 4287 if (hive) {
df9c8d1aa278c4 Dennis Li 2020-07-08 4288 if (atomic_cmpxchg(&hive->in_reset, 0, 1) != 0) {
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4289 DRM_INFO("Bailing on TDR for s_job:%llx, hive: %llx as another already in progress",
0b2d2c2eecf27f Andrey Grodzovsky 2019-08-27 4290 job ? job->base.id : -1, hive->hive_id);
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4291 return 0;
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4292 }
df9c8d1aa278c4 Dennis Li 2020-07-08 @4293 mutex_lock(&hive->hive_lock);
df9c8d1aa278c4 Dennis Li 2020-07-08 4294 }
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4295
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4296 /*
9e94d22c008585 Evan Quan 2020-04-16 4297 * Build list of devices to reset.
9e94d22c008585 Evan Quan 2020-04-16 4298 * In case we are in XGMI hive mode, resort the device list
9e94d22c008585 Evan Quan 2020-04-16 4299 * to put adev in the 1st position.
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4300 */
9e94d22c008585 Evan Quan 2020-04-16 4301 INIT_LIST_HEAD(&device_list);
9e94d22c008585 Evan Quan 2020-04-16 4302 if (adev->gmc.xgmi.num_physical_nodes > 1) {
9e94d22c008585 Evan Quan 2020-04-16 4303 if (!hive)
9e94d22c008585 Evan Quan 2020-04-16 @4304 return -ENODEV;
9e94d22c008585 Evan Quan 2020-04-16 4305 if (!list_is_first(&adev->gmc.xgmi.head, &hive->device_list))
9e94d22c008585 Evan Quan 2020-04-16 4306 list_rotate_to_front(&adev->gmc.xgmi.head, &hive->device_list);
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4307 device_list_handle = &hive->device_list;
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4308 } else {
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4309 list_add_tail(&adev->gmc.xgmi.head, &device_list);
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4310 device_list_handle = &device_list;
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4311 }
26bc534094ed45 Andrey Grodzovsky 2018-11-22 4312
12ffa55da60f83 Andrey Grodzovsky 2019-08-30 4313 /* block all schedulers and reset given job's ring */
12ffa55da60f83 Andrey Grodzovsky 2019-08-30 4314 list_for_each_entry(tmp_adev, device_list_handle, gmc.xgmi.head) {
df9c8d1aa278c4 Dennis Li 2020-07-08 4315 if (!amdgpu_device_lock_adev(tmp_adev)) {
9e94d22c008585 Evan Quan 2020-04-16 4316 DRM_INFO("Bailing on TDR for s_job:%llx, as another already in progress",
9e94d22c008585 Evan Quan 2020-04-16 4317 job ? job->base.id : -1);
df9c8d1aa278c4 Dennis Li 2020-07-08 4318 r = 0;
df9c8d1aa278c4 Dennis Li 2020-07-08 4319 goto skip_recovery;
7c6e68c777f109 Andrey Grodzovsky 2019-09-13 4320 }
7c6e68c777f109 Andrey Grodzovsky 2019-09-13 4321
3f12acc8d6d4b2 Evan Quan 2020-04-21 4322 /*
3f12acc8d6d4b2 Evan Quan 2020-04-21 4323 * Try to put the audio codec into suspend state
3f12acc8d6d4b2 Evan Quan 2020-04-21 4324 * before gpu reset started.
3f12acc8d6d4b2 Evan Quan 2020-04-21 4325 *
3f12acc8d6d4b2 Evan Quan 2020-04-21 4326 * Due to the power domain of the graphics device
3f12acc8d6d4b2 Evan Quan 2020-04-21 4327 * is shared with AZ power domain. Without this,
3f12acc8d6d4b2 Evan Quan 2020-04-21 4328 * we may change the audio hardware from behind
3f12acc8d6d4b2 Evan Quan 2020-04-21 4329 * the audio driver's back. That will trigger
3f12acc8d6d4b2 Evan Quan 2020-04-21 4330 * some audio codec errors.
3f12acc8d6d4b2 Evan Quan 2020-04-21 4331 */
3f12acc8d6d4b2 Evan Quan 2020-04-21 4332 if (!amdgpu_device_suspend_display_audio(tmp_adev))
3f12acc8d6d4b2 Evan Quan 2020-04-21 4333 audio_suspended = true;
3f12acc8d6d4b2 Evan Quan 2020-04-21 4334
9e94d22c008585 Evan Quan 2020-04-16 4335 amdgpu_ras_set_error_query_ready(tmp_adev, false);
9e94d22c008585 Evan Quan 2020-04-16 4336
52fb44cf30fc6b Evan Quan 2020-04-16 4337 cancel_delayed_work_sync(&tmp_adev->delayed_init_work);
52fb44cf30fc6b Evan Quan 2020-04-16 4338
9e94d22c008585 Evan Quan 2020-04-16 4339 if (!amdgpu_sriov_vf(tmp_adev))
9e94d22c008585 Evan Quan 2020-04-16 4340 amdgpu_amdkfd_pre_reset(tmp_adev);
9e94d22c008585 Evan Quan 2020-04-16 4341
fdafb3597a2cc4 Evan Quan 2019-06-26 4342 /*
fdafb3597a2cc4 Evan Quan 2019-06-26 4343 * Mark these ASICs to be reseted as untracked first
fdafb3597a2cc4 Evan Quan 2019-06-26 4344 * And add them back after reset completed
fdafb3597a2cc4 Evan Quan 2019-06-26 4345 */
fdafb3597a2cc4 Evan Quan 2019-06-26 4346 amdgpu_unregister_gpu_instance(tmp_adev);
fdafb3597a2cc4 Evan Quan 2019-06-26 4347
a2f63ee8b5eabd Evan Quan 2020-04-16 4348 amdgpu_fbdev_set_suspend(tmp_adev, 1);
565d1941557756 Evan Quan 2020-03-11 4349
f1c1314be42971 xinhui pan 2019-07-04 4350 /* disable ras on ALL IPs */
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4351 if (!need_emergency_restart &&
b823821f2244ad Le Ma 2019-11-27 4352 amdgpu_device_ip_need_full_reset(tmp_adev))
f1c1314be42971 xinhui pan 2019-07-04 4353 amdgpu_ras_suspend(tmp_adev);
f1c1314be42971 xinhui pan 2019-07-04 4354
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4355 for (i = 0; i < AMDGPU_MAX_RINGS; ++i) {
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4356 struct amdgpu_ring *ring = tmp_adev->rings[i];
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4357
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4358 if (!ring || !ring->sched.thread)
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4359 continue;
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4360
0b2d2c2eecf27f Andrey Grodzovsky 2019-08-27 4361 drm_sched_stop(&ring->sched, job ? &job->base : NULL);
7c6e68c777f109 Andrey Grodzovsky 2019-09-13 4362
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4363 if (need_emergency_restart)
7c6e68c777f109 Andrey Grodzovsky 2019-09-13 4364 amdgpu_job_stop_all_jobs_on_sched(&ring->sched);
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4365 }
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4366 }
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4367
bb5c7235eaafb4 Wenhui Sheng 2020-07-13 4368 if (need_emergency_restart)
7c6e68c777f109 Andrey Grodzovsky 2019-09-13 4369 goto skip_sched_resume;
7c6e68c777f109 Andrey Grodzovsky 2019-09-13 4370
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4371 /*
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4372 * Must check guilty signal here since after this point all old
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4373 * HW fences are force signaled.
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4374 *
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4375 * job->base holds a reference to parent fence
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4376 */
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4377 if (job && job->base.s_fence->parent &&
7dd8c205eaedfa Evan Quan 2020-04-16 4378 dma_fence_is_signaled(job->base.s_fence->parent)) {
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4379 job_signaled = true;
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4380 dev_info(adev->dev, "Guilty job already signaled, skipping HW reset");
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4381 goto skip_hw_reset;
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4382 }
1d721ed679db18 Andrey Grodzovsky 2019-04-18 4383
:::::: The code at line 4304 was first introduced by commit
:::::: 9e94d22c008585815f32630ee7d0d28c4ec12bb7 drm/amdgpu: optimize the gpu reset for XGMI setup V2
:::::: TO: Evan Quan <evan.quan(a)amd.com>
:::::: CC: Alex Deucher <alexander.deucher(a)amd.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months
[tip:master 30/40] kernel/entry/common.c:163 exit_to_user_mode_prepare() warn: ignoring unreachable code.
by kernel test robot
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
CC: x86(a)kernel.org
TO: Ingo Molnar <mingo(a)kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git master
head: 2403d9db4e8ddfbb4457fbb8d83057092d0af409
commit: 4733c2b49742380fa501009f4ee9b8d2ee44c66a [30/40] Merge branch 'WIP.x86/entry'
:::::: branch date:
:::::: commit date: 2 days ago
config: i386-randconfig-m021-20200730 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
kernel/entry/common.c:163 exit_to_user_mode_prepare() warn: ignoring unreachable code.
arch/x86/entry/common.c:203 idtentry_enter_nmi() warn: statement has no effect 3
# https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git/commit/?id=47...
git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
git remote update tip
git checkout 4733c2b49742380fa501009f4ee9b8d2ee44c66a
vim +163 kernel/entry/common.c
a9f3a74a29af09 Thomas Gleixner 2020-07-22 158
a9f3a74a29af09 Thomas Gleixner 2020-07-22 159 static void exit_to_user_mode_prepare(struct pt_regs *regs)
a9f3a74a29af09 Thomas Gleixner 2020-07-22 160 {
a9f3a74a29af09 Thomas Gleixner 2020-07-22 161 unsigned long ti_work = READ_ONCE(current_thread_info()->flags);
a9f3a74a29af09 Thomas Gleixner 2020-07-22 162
a9f3a74a29af09 Thomas Gleixner 2020-07-22 @163 lockdep_assert_irqs_disabled();
a9f3a74a29af09 Thomas Gleixner 2020-07-22 164
a9f3a74a29af09 Thomas Gleixner 2020-07-22 165 if (unlikely(ti_work & EXIT_TO_USER_MODE_WORK))
a9f3a74a29af09 Thomas Gleixner 2020-07-22 166 ti_work = exit_to_user_mode_loop(regs, ti_work);
a9f3a74a29af09 Thomas Gleixner 2020-07-22 167
a9f3a74a29af09 Thomas Gleixner 2020-07-22 168 arch_exit_to_user_mode_prepare(regs, ti_work);
a9f3a74a29af09 Thomas Gleixner 2020-07-22 169
a9f3a74a29af09 Thomas Gleixner 2020-07-22 170 /* Ensure that the address limit is intact and no locks are held */
a9f3a74a29af09 Thomas Gleixner 2020-07-22 171 addr_limit_user_check();
a9f3a74a29af09 Thomas Gleixner 2020-07-22 172 lockdep_assert_irqs_disabled();
a9f3a74a29af09 Thomas Gleixner 2020-07-22 173 lockdep_sys_exit();
a9f3a74a29af09 Thomas Gleixner 2020-07-22 174 }
a9f3a74a29af09 Thomas Gleixner 2020-07-22 175
:::::: The code at line 163 was first introduced by commit
:::::: a9f3a74a29af095f3e1b89e9176f8127912ae0f0 entry: Provide generic syscall exit function
:::::: TO: Thomas Gleixner <tglx(a)linutronix.de>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 9 months