[kbuild] [mmotm:master 64/350] fs/ocfs2/dlmglue.c:3184 ocfs2_mark_lockres_freeing() error: double lock 'irqsave:flags'
TO: Jan Kara j...@suse.cz CC: Johannes Weiner han...@cmpxchg.org CC: Andrew Morton a...@linux-foundation.org CC: Linux Memory Management List linux...@kvack.org Hi Jan, FYI, there are new smatch warnings show up in tree: git://git.cmpxchg.org/linux-mmotm.git master head: a6a1126d3535f0bd8d7c56810061541a4f5595af commit: c8acdd9e9cf2dd5a5f62034dfaf93c721b3f405d [64/350] ocfs2: avoid blocking in ocfs2_mark_lockres_freeing() in downconvert thread :: branch date: 11 hours ago :: commit date: 11 hours ago fs/ocfs2/dlmglue.c:3184 ocfs2_mark_lockres_freeing() error: double lock 'irqsave:flags' fs/ocfs2/dlmglue.c:3204 ocfs2_mark_lockres_freeing() error: double unlock 'irqsave:flags' git remote add mmotm git://git.cmpxchg.org/linux-mmotm.git git remote update mmotm git checkout c8acdd9e9cf2dd5a5f62034dfaf93c721b3f405d vim +3184 fs/ocfs2/dlmglue.c c8acdd9e Jan Kara2014-02-25 3178* ocfs2_clear_inode() c8acdd9e Jan Kara2014-02-25 3179* ocfs2_mark_lockres_freeing() c8acdd9e Jan Kara2014-02-25 3180* ... blocks waiting for OCFS2_LOCK_QUEUED c8acdd9e Jan Kara2014-02-25 3181* since we are the downconvert thread which c8acdd9e Jan Kara2014-02-25 3182* should clear the flag. c8acdd9e Jan Kara2014-02-25 3183*/ c8acdd9e Jan Kara2014-02-25 @3184 spin_lock_irqsave(osb-dc_task_lock, flags); c8acdd9e Jan Kara2014-02-25 3185 list_del_init(lockres-l_blocked_list); c8acdd9e Jan Kara2014-02-25 3186 osb-blocked_lock_count--; c8acdd9e Jan Kara2014-02-25 3187 spin_unlock_irqrestore(osb-dc_task_lock, flags); c8acdd9e Jan Kara2014-02-25 3188 lockres_clear_flags(lockres, OCFS2_LOCK_QUEUED); c8acdd9e Jan Kara2014-02-25 3189 goto out_unlock; c8acdd9e Jan Kara2014-02-25 3190 } ccd979bd Mark Fasheh 2005-12-15 3191 while (lockres-l_flags OCFS2_LOCK_QUEUED) { ccd979bd Mark Fasheh 2005-12-15 3192 lockres_add_mask_waiter(lockres, mw, OCFS2_LOCK_QUEUED, 0); ccd979bd Mark Fasheh 2005-12-15 3193 spin_unlock_irqrestore(lockres-l_lock, flags); ccd979bd Mark Fasheh 2005-12-15 3194 ccd979bd Mark Fasheh 2005-12-15 3195 mlog(0, Waiting on lockres %s\n, lockres-l_name); ccd979bd Mark Fasheh 2005-12-15 3196 ccd979bd Mark Fasheh 2005-12-15 3197 status = ocfs2_wait_for_mask(mw); ccd979bd Mark Fasheh 2005-12-15 3198 if (status) ccd979bd Mark Fasheh 2005-12-15 3199 mlog_errno(status); ccd979bd Mark Fasheh 2005-12-15 3200 ccd979bd Mark Fasheh 2005-12-15 3201 spin_lock_irqsave(lockres-l_lock, flags); ccd979bd Mark Fasheh 2005-12-15 3202 } c8acdd9e Jan Kara2014-02-25 3203 out_unlock: ccd979bd Mark Fasheh 2005-12-15 @3204 spin_unlock_irqrestore(lockres-l_lock, flags); ccd979bd Mark Fasheh 2005-12-15 3205 } ccd979bd Mark Fasheh 2005-12-15 3206 d680efe9 Mark Fasheh 2006-09-08 3207 void ocfs2_simple_drop_lockres(struct ocfs2_super *osb, --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [next:master 4169/4893] sound/soc/intel/sst-haswell-ipc.c:553 ipc_tx_message() warn: inconsistent returns irqsave:flags: locked (531 [(-16)]) unlocked (551 [(-110), 0], 553 [0])
TO: Liam Girdwood liam.r.girdw...@linux.intel.com CC: Mark Brown broo...@linaro.org Hi Liam, FYI, there are new smatch warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 7b8d52f8c3305c98006fbbe58bdc3f1d7d34e462 commit: 90931b9eaed9aaf772784a93da320cf10713effa [4169/4893] ASoC: Intel: Add Haswell Machine support :: branch date: 27 hours ago :: commit date: 4 days ago sound/soc/intel/sst-haswell-ipc.c:553 ipc_tx_message() warn: inconsistent returns irqsave:flags: locked (531 [(-16)]) unlocked (551 [(-110),0], 553 [0]) sound/soc/intel/sst-haswell-ipc.c:620 hsw_notification_work() warn: sizoef(pointer)? sound/soc/intel/sst-haswell-ipc.c:620 hsw_notification_work() warn: was 'sizeof(*pos)' intended? sound/soc/intel/sst-haswell-pcm.c:761 hsw_pcm_probe() error: no modifiers for allocation. sound/soc/intel/sst-haswell-pcm.c:768 hsw_pcm_probe() error: no modifiers for allocation. git remote add next git://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git remote update next git checkout 90931b9eaed9aaf772784a93da320cf10713effa vim +553 sound/soc/intel/sst-haswell-ipc.c 22981243 Liam Girdwood 2014-02-20 547 22981243 Liam Girdwood 2014-02-20 548 queue_kthread_work(hsw-kworker, hsw-kwork); 22981243 Liam Girdwood 2014-02-20 549 22981243 Liam Girdwood 2014-02-20 550 if (wait) 22981243 Liam Girdwood 2014-02-20 551 return tx_wait_done(hsw, msg, rx_data); 22981243 Liam Girdwood 2014-02-20 552 else 22981243 Liam Girdwood 2014-02-20 @553 return 0; 22981243 Liam Girdwood 2014-02-20 554 } 22981243 Liam Girdwood 2014-02-20 555 22981243 Liam Girdwood 2014-02-20 556 static inline int ipc_tx_message_wait(struct sst_hsw *hsw, u32 header, 22981243 Liam Girdwood 2014-02-20 557 void *tx_data, size_t tx_bytes, void *rx_data, size_t rx_bytes) 22981243 Liam Girdwood 2014-02-20 558 { 22981243 Liam Girdwood 2014-02-20 559 return ipc_tx_message(hsw, header, tx_data, tx_bytes, rx_data, 22981243 Liam Girdwood 2014-02-20 560 rx_bytes, 1); 22981243 Liam Girdwood 2014-02-20 561 } 22981243 Liam Girdwood 2014-02-20 562 22981243 Liam Girdwood 2014-02-20 563 static inline int ipc_tx_message_nowait(struct sst_hsw *hsw, u32 header, 22981243 Liam Girdwood 2014-02-20 564 void *tx_data, size_t tx_bytes) 22981243 Liam Girdwood 2014-02-20 565 { 22981243 Liam Girdwood 2014-02-20 566 return ipc_tx_message(hsw, header, tx_data, tx_bytes, NULL, 0, 0); 22981243 Liam Girdwood 2014-02-20 567 } 22981243 Liam Girdwood 2014-02-20 568 22981243 Liam Girdwood 2014-02-20 569 static void hsw_fw_ready(struct sst_hsw *hsw, u32 header) 22981243 Liam Girdwood 2014-02-20 570 { 22981243 Liam Girdwood 2014-02-20 571 struct sst_hsw_ipc_fw_ready fw_ready; 22981243 Liam Girdwood 2014-02-20 572 u32 offset; 22981243 Liam Girdwood 2014-02-20 573 22981243 Liam Girdwood 2014-02-20 574 offset = (header 0x1FFF) 3; 22981243 Liam Girdwood 2014-02-20 575 22981243 Liam Girdwood 2014-02-20 576 dev_dbg(hsw-dev, ipc: DSP is ready 0x%8.8x offset %d\n, 22981243 Liam Girdwood 2014-02-20 577 header, offset); 22981243 Liam Girdwood 2014-02-20 578 22981243 Liam Girdwood 2014-02-20 579 /* copy data from the DSP FW ready offset */ 22981243 Liam Girdwood 2014-02-20 580 sst_dsp_read(hsw-dsp, fw_ready, offset, sizeof(fw_ready)); 22981243 Liam Girdwood 2014-02-20 581 22981243 Liam Girdwood 2014-02-20 582 sst_dsp_mailbox_init(hsw-dsp, fw_ready.inbox_offset, 22981243 Liam Girdwood 2014-02-20 583 fw_ready.inbox_size, fw_ready.outbox_offset, 22981243 Liam Girdwood 2014-02-20 584 fw_ready.outbox_size); 22981243 Liam Girdwood 2014-02-20 585 22981243 Liam Girdwood 2014-02-20 586 hsw-boot_complete = true; 22981243 Liam Girdwood 2014-02-20 587 wake_up(hsw-boot_wait); 22981243 Liam Girdwood 2014-02-20 588 22981243 Liam Girdwood 2014-02-20 589 dev_dbg(hsw-dev, mailbox upstream 0x%x - size 0x%x\n, 22981243 Liam Girdwood 2014-02-20 590 fw_ready.inbox_offset, fw_ready.inbox_size); 22981243 Liam Girdwood 2014-02-20 591 dev_dbg(hsw-dev, mailbox downstream 0x%x - size 0x%x\n, 22981243 Liam Girdwood 2014-02-20 592 fw_ready.outbox_offset, fw_ready.outbox_size); 22981243 Liam Girdwood 2014-02-20 593 } 22981243 Liam Girdwood 2014-02-20 594 22981243 Liam Girdwood 2014-02-20 595 static void hsw_notification_work(struct work_struct *work) 22981243 Liam Girdwood 2014-02-20 596 { 22981243 Liam Girdwood 2014-02-20 597 struct sst_hsw_stream *stream = container_of(work, 22981243 Liam Girdwood 2014-02-20 598 struct sst_hsw_stream, notify_work); 22981243 Liam Girdwood 2014-02-20 599 struct
Re: [kbuild] [next:master 4169/4893] sound/soc/intel/sst-haswell-ipc.c:553 ipc_tx_message() warn: inconsistent returns irqsave:flags: locked (531 [(-16)]) unlocked (551 [(-110), 0], 553 [0])
On Wed, Feb 26, 2014 at 06:22:01PM +0800, kbuild test robot wrote: sound/soc/intel/sst-haswell-ipc.c:553 ipc_tx_message() warn: inconsistent returns irqsave:flags: locked (531 [(-16)]) unlocked (551 [(-110),0], 553 [0]) sound/soc/intel/sst-haswell-ipc.c:620 hsw_notification_work() warn: sizoef(pointer)? sound/soc/intel/sst-haswell-ipc.c:620 hsw_notification_work() warn: was 'sizeof(*pos)' intended? I fixed these earlier... sound/soc/intel/sst-haswell-pcm.c:761 hsw_pcm_probe() error: no modifiers for allocation. sound/soc/intel/sst-haswell-pcm.c:768 hsw_pcm_probe() error: no modifiers for allocation. For some reason Smatch complains about: priv_data-pcm_pg[i][1] = kzalloc(PAGE_SIZE, GFP_DMA); When I added the check to Smatch I thought that was invalid but that was years ago and now I'm not sure if it's valid or not. regards, dan carpenter ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [mmotm:master 64/350] fs/ocfs2/dlmglue.c:3184 ocfs2_mark_lockres_freeing() error: double lock 'irqsave:flags'
[ False positive, this is not a bug, it's just that the second IRQ save is unnecessary ]. Hi Jan, FYI, there are new smatch warnings show up in tree: git://git.cmpxchg.org/linux-mmotm.git master head: a6a1126d3535f0bd8d7c56810061541a4f5595af commit: c8acdd9e9cf2dd5a5f62034dfaf93c721b3f405d [64/350] ocfs2: avoid blocking in ocfs2_mark_lockres_freeing() in downconvert thread fs/ocfs2/dlmglue.c:3184 ocfs2_mark_lockres_freeing() error: double lock 'irqsave:flags' fs/ocfs2/dlmglue.c:3204 ocfs2_mark_lockres_freeing() error: double unlock 'irqsave:flags' git remote add mmotm git://git.cmpxchg.org/linux-mmotm.git git remote update mmotm git checkout c8acdd9e9cf2dd5a5f62034dfaf93c721b3f405d vim +3184 fs/ocfs2/dlmglue.c c8acdd9e Jan Kara2014-02-25 3178* ocfs2_clear_inode() c8acdd9e Jan Kara2014-02-25 3179* ocfs2_mark_lockres_freeing() c8acdd9e Jan Kara2014-02-25 3180* ... blocks waiting for OCFS2_LOCK_QUEUED c8acdd9e Jan Kara2014-02-25 3181* since we are the downconvert thread which c8acdd9e Jan Kara2014-02-25 3182* should clear the flag. c8acdd9e Jan Kara2014-02-25 3183*/ c8acdd9e Jan Kara2014-02-25 @3184 spin_lock_irqsave(osb-dc_task_lock, flags); c8acdd9e Jan Kara2014-02-25 3185 list_del_init(lockres-l_blocked_list); c8acdd9e Jan Kara2014-02-25 3186 osb-blocked_lock_count--; c8acdd9e Jan Kara2014-02-25 3187 spin_unlock_irqrestore(osb-dc_task_lock, flags); c8acdd9e Jan Kara2014-02-25 3188 lockres_clear_flags(lockres, OCFS2_LOCK_QUEUED); c8acdd9e Jan Kara2014-02-25 3189 goto out_unlock; c8acdd9e Jan Kara2014-02-25 3190 } ccd979bd Mark Fasheh 2005-12-15 3191 while (lockres-l_flags OCFS2_LOCK_QUEUED) { ccd979bd Mark Fasheh 2005-12-15 3192 lockres_add_mask_waiter(lockres, mw, OCFS2_LOCK_QUEUED, 0); ccd979bd Mark Fasheh 2005-12-15 3193 spin_unlock_irqrestore(lockres-l_lock, flags); ccd979bd Mark Fasheh 2005-12-15 3194 ccd979bd Mark Fasheh 2005-12-15 3195 mlog(0, Waiting on lockres %s\n, lockres-l_name); ccd979bd Mark Fasheh 2005-12-15 3196 ccd979bd Mark Fasheh 2005-12-15 3197 status = ocfs2_wait_for_mask(mw); ccd979bd Mark Fasheh 2005-12-15 3198 if (status) ccd979bd Mark Fasheh 2005-12-15 3199 mlog_errno(status); ccd979bd Mark Fasheh 2005-12-15 3200 ccd979bd Mark Fasheh 2005-12-15 3201 spin_lock_irqsave(lockres-l_lock, flags); ccd979bd Mark Fasheh 2005-12-15 3202 } c8acdd9e Jan Kara2014-02-25 3203 out_unlock: ccd979bd Mark Fasheh 2005-12-15 @3204 spin_unlock_irqrestore(lockres-l_lock, flags); ccd979bd Mark Fasheh 2005-12-15 3205 } ccd979bd Mark Fasheh 2005-12-15 3206 d680efe9 Mark Fasheh 2006-09-08 3207 void ocfs2_simple_drop_lockres(struct ocfs2_super *osb, --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [digsig:dm-integrity 1/4] drivers/md/dm-integrity.c:431 dm_int_verify_io() warn: passing the wrong stuff kunmap()
TO: Dmitry Kasatkin d.kasat...@samsung.com Hi Dmitry, FYI, there are new smatch warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/kasatkin/linux-digsig.git dm-integrity head: 6fb61adc51796f1379c3b1432340c67d82c794e2 commit: 883e383ea2a3c0c7bdc78f21a6c65ec9b65342ec [1/4] dm-integrity: integrity protection device-mapper target :: branch date: 75 minutes ago :: commit date: 75 minutes ago drivers/md/dm-integrity.c:431 dm_int_verify_io() warn: passing the wrong stuff kunmap() git remote add digsig git://git.kernel.org/pub/scm/linux/kernel/git/kasatkin/linux-digsig.git git remote update digsig git checkout 883e383ea2a3c0c7bdc78f21a6c65ec9b65342ec vim +431 drivers/md/dm-integrity.c 883e383e Dmitry Kasatkin 2013-10-23 415if (err) 883e383e Dmitry Kasatkin 2013-10-23 416break; 883e383e Dmitry Kasatkin 2013-10-23 417 883e383e Dmitry Kasatkin 2013-10-23 418err = dm_int_calc_hmac(io, offset, digest, sizeof(digest), 883e383e Dmitry Kasatkin 2013-10-23 419 hmac); 883e383e Dmitry Kasatkin 2013-10-23 420if (err) 883e383e Dmitry Kasatkin 2013-10-23 421break; 883e383e Dmitry Kasatkin 2013-10-23 422 883e383e Dmitry Kasatkin 2013-10-23 423err = dm_int_verify_hmac(io, offset, hmac, bio_data_dir(bio)); 883e383e Dmitry Kasatkin 2013-10-23 424if (err) { 883e383e Dmitry Kasatkin 2013-10-23 425if (dmi-flags DM_INT_FLAGS_ZERO) { 883e383e Dmitry Kasatkin 2013-10-23 426void *ptr = kmap(bv-bv_page); 883e383e Dmitry Kasatkin 2013-10-23 427if (!ptr) 883e383e Dmitry Kasatkin 2013-10-23 428 break; 883e383e Dmitry Kasatkin 2013-10-23 429 DMERR_LIMIT(Ignoring bad HMAC); 883e383e Dmitry Kasatkin 2013-10-23 430 memset(ptr + bv-bv_offset, 0, bv-bv_len); 883e383e Dmitry Kasatkin 2013-10-23 @431 kunmap(ptr); 883e383e Dmitry Kasatkin 2013-10-23 432err = 0; 883e383e Dmitry Kasatkin 2013-10-23 433} else 883e383e Dmitry Kasatkin 2013-10-23 434break; 883e383e Dmitry Kasatkin 2013-10-23 435} 883e383e Dmitry Kasatkin 2013-10-23 436 883e383e Dmitry Kasatkin 2013-10-23 437offset += bv-bv_len; 883e383e Dmitry Kasatkin 2013-10-23 438size -= bv-bv_len; 883e383e Dmitry Kasatkin 2013-10-23 439} --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild
[kbuild] [digsig:dm-integrity 1/4] drivers/md/dm-integrity.c:431 dm_int_verify_io() warn: passing the wrong stuff kunmap()
[ The error message has bad grammar and is confusing. It means that it should be kunmap(bv-bv_page) - dan] Hi Dmitry, FYI, there are new smatch warnings show up in tree: git://git.kernel.org/pub/scm/linux/kernel/git/kasatkin/linux-digsig.git dm-integrity head: 6fb61adc51796f1379c3b1432340c67d82c794e2 commit: 883e383ea2a3c0c7bdc78f21a6c65ec9b65342ec [1/4] dm-integrity: integrity protection device-mapper target drivers/md/dm-integrity.c:431 dm_int_verify_io() warn: passing the wrong stuff kunmap() git remote add digsig git://git.kernel.org/pub/scm/linux/kernel/git/kasatkin/linux-digsig.git git remote update digsig git checkout 883e383ea2a3c0c7bdc78f21a6c65ec9b65342ec vim +431 drivers/md/dm-integrity.c 883e383e Dmitry Kasatkin 2013-10-23 415if (err) 883e383e Dmitry Kasatkin 2013-10-23 416break; 883e383e Dmitry Kasatkin 2013-10-23 417 883e383e Dmitry Kasatkin 2013-10-23 418err = dm_int_calc_hmac(io, offset, digest, sizeof(digest), 883e383e Dmitry Kasatkin 2013-10-23 419 hmac); 883e383e Dmitry Kasatkin 2013-10-23 420if (err) 883e383e Dmitry Kasatkin 2013-10-23 421break; 883e383e Dmitry Kasatkin 2013-10-23 422 883e383e Dmitry Kasatkin 2013-10-23 423err = dm_int_verify_hmac(io, offset, hmac, bio_data_dir(bio)); 883e383e Dmitry Kasatkin 2013-10-23 424if (err) { 883e383e Dmitry Kasatkin 2013-10-23 425if (dmi-flags DM_INT_FLAGS_ZERO) { 883e383e Dmitry Kasatkin 2013-10-23 426void *ptr = kmap(bv-bv_page); 883e383e Dmitry Kasatkin 2013-10-23 427if (!ptr) 883e383e Dmitry Kasatkin 2013-10-23 428 break; 883e383e Dmitry Kasatkin 2013-10-23 429 DMERR_LIMIT(Ignoring bad HMAC); 883e383e Dmitry Kasatkin 2013-10-23 430 memset(ptr + bv-bv_offset, 0, bv-bv_len); 883e383e Dmitry Kasatkin 2013-10-23 @431 kunmap(ptr); 883e383e Dmitry Kasatkin 2013-10-23 432err = 0; 883e383e Dmitry Kasatkin 2013-10-23 433} else 883e383e Dmitry Kasatkin 2013-10-23 434break; 883e383e Dmitry Kasatkin 2013-10-23 435} 883e383e Dmitry Kasatkin 2013-10-23 436 883e383e Dmitry Kasatkin 2013-10-23 437offset += bv-bv_len; 883e383e Dmitry Kasatkin 2013-10-23 438size -= bv-bv_len; 883e383e Dmitry Kasatkin 2013-10-23 439} --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation ___ kbuild mailing list kbuild@lists.01.org https://lists.01.org/mailman/listinfo/kbuild