Re: [dm-devel] [PATCH v2 2/4] dm ioctl: Allow userspace to provide expected diskseq

2023-06-27 Thread Dan Carpenter
start bothering newbies who don't know what the situation is. regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [v2 2/4] dm ioctl: Allow userspace to provide expected diskseq

2023-06-27 Thread Dan Carpenter
. regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH v2 2/4] dm ioctl: Allow userspace to provide expected diskseq

2023-06-27 Thread Dan Carpenter
fore, that if you spot a bug in a patch that's welcome feedback but if you just have comments about grammar then no one wants that. regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [bug report] dm flakey: clone pages on write bio before corrupting them

2023-06-15 Thread Dan Carpenter
BUG(); 1153 } 1154 } 1155 1156 if (static_branch_unlikely(_bios_enabled) && --> 1157 unlikely(swap_bios_limit(ti, bio))) Use after free. 1158 up(>swap_bios_semaphore); 1159 1160

Re: [dm-devel] [bug report] dm crypt: conditionally enable code needed for tasklet usecases

2023-03-09 Thread Dan Carpenter
On Thu, Mar 09, 2023 at 05:35:20PM +0300, Dan Carpenter wrote: > --> 2758 if (test_bit(DM_CRYPT_NO_READ_WORKQUEUE, >flags) || >^ > 2759 test_bit(DM_CRYPT_NO_WRITE_WO

[dm-devel] [bug report] dm crypt: conditionally enable code needed for tasklet usecases

2023-03-09 Thread Dan Carpenter
UAF bugs can only be detected with KASan, but kfree_sensitive() should poison the data I thought). 2760 static_branch_dec(_tasklet_enabled); 2761 2762 dm_audit_log_dtr(DM_MSG_PREFIX, ti, 1); 2763 } regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https:

Re: [dm-devel] [linux-next:master] BUILD REGRESSION 088b9c375534d905a4d337c78db3b3bfbb52c4a0

2022-07-12 Thread Dan Carpenter
: from is NULL but dereferenced. drivers/android/binder.c:2920:29-33: ERROR: target_thread is NULL but dereferenced. drivers/android/binder.c:353:25-35: ERROR: node -> proc is NULL but dereferenced. drivers/android/binder.c:4888:16-20: ERROR: t is NULL but dereferenced. regards, dan carpenter --

[dm-devel] [PATCH] dm integrity: fix error code in dm_integrity_ctr()

2022-04-25 Thread Dan Carpenter
ada909bfd7 ("dm: add integrity target") Signed-off-by: Dan Carpenter --- drivers/md/dm-integrity.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/md/dm-integrity.c b/drivers/md/dm-integrity.c index 36ae30b73a6e..3d5a0ce123c9 100644 --- a/drivers/md/dm-integrity.c +++ b/driver

Re: [dm-devel] [PATCH v2 07/10] nvmet: add copy command support for bdev and file ns

2022-02-10 Thread Dan Carpenter
/20220211/202202110625.4yhrkaun-...@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter New smatch warnings: drivers/nvme/target/io-cmd-file.c:377 nvmet_file_copy_work

Re: [dm-devel] [PATCH v2 03/10] block: Add copy offload support infrastructure

2022-02-08 Thread Dan Carpenter
/20220209/202202090703.u5ribmin-...@intel.com/config) compiler: gcc-9 (Debian 9.3.0-22) 9.3.0 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot Reported-by: Dan Carpenter smatch warnings: block/blk-lib.c:272 blk_copy_offload() warn: possible memory leak

[dm-devel] [kbuild] Re: [PATCH v4 2/3] scsi: scsi_ioctl: add sg_io_to_blk_status()

2021-06-29 Thread Dan Carpenter
Hi, url: https://github.com/0day-ci/linux/commits/mwilck-suse-com/scsi-dm-dm_blk_ioctl-implement-failover-for-SG_IO-on-dm-multipath/20210628-175410 base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next config: xtensa-randconfig-s032-20210628 (attached as .config)

Re: [dm-devel] [bug report] dm: introduce zone append emulation

2021-06-18 Thread Dan Carpenter
On Fri, Jun 18, 2021 at 03:22:03PM +0300, Dan Carpenter wrote: > Hello Damien Le Moal, > > The patch bb37d77239af: "dm: introduce zone append emulation" from > May 26, 2021, leads to the following static checker warning: > > drivers/md/dm-zone.c:207 dm_zone_r

[dm-devel] [bug report] dm: introduce zone append emulation

2021-06-18 Thread Dan Carpenter
t;start); 218 return -ENODEV; 219 } 220 221 return 0; 222 } regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://listman.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 000/141] Fix fall-through warnings for Clang

2020-12-02 Thread Dan Carpenter
ing. > > FWIW, this series has found at least one bug so far: > https://lore.kernel.org/lkml/CAFCwf11izHF=g1mGry1fE5kvFFFrxzhPSM6qKAO8gxSp=kr...@mail.gmail.com/ This is a fallthrough to a return and not to a break. That should trigger a warning. The fallthrough to a break should not generate a warning. The bug we're trying to fix is "missing break statement" but if the result of the bug is "we hit a break statement" then now we're just talking about style. GCC should limit itself to warning about potentially buggy code. regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [PATCH 000/141] Fix fall-through warnings for Clang

2020-12-02 Thread Dan Carpenter
t; case 0: > ++x; > default: > ; > } Don't warn for this. If adding a break statement changes the flow of the code then warn about potentially missing break statements, but if it doesn't change anything then don't warn about it. regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [bug report] dm mpath: add IO affinity path selector

2020-11-13 Thread Dan Carpenter
ount_dec_and_test(>refcount)) { 98 *error = "io-affinity ps: No new/valid CPU mapping found"; 99 ret = -EINVAL; 100 goto free_mask; 101 } 102 103 return 0; 104 105 free_mask: 106

[dm-devel] [bug report] dm zoned: per-device reclaim

2020-06-05 Thread Dan Carpenter
imed zone %u in %u ms", 443 dmz_metadata_label(zmd), zrc->dev_idx, 444 rzone->id, jiffies_to_msecs(jiffies - start)); 445 return 0; 446 } regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [bug report] dm zoned: metadata version 2

2020-05-13 Thread Dan Carpenter
ti, dmz->ddev[1], 0, capacity, data); 1052 } 1053 return r; 1054 } regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [bug report] dm: add emulated block size target

2020-04-29 Thread Dan Carpenter
buffers after processing I/O on them 195 * but before we endio thus addressing REQ_FUA/REQ_SYNC. 196 */ 197 r = write ? dm_bufio_write_dirty_buffers(ec->bufio) : 0; regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH] dm zoned: Potential NULL dereference in dmz_do_reclaim()

2019-08-19 Thread Dan Carpenter
This function is supposed to return error pointers so it matches the dmz_get_rnd_zone_for_reclaim() function. The current code could lead to a NULL dereference in dmz_do_reclaim() Fixes: b234c6d7a703 ("dm zoned: improve error handling in reclaim") Signed-off-by: Dan Carpenter --- dri

[dm-devel] [PATCH v3] dm zoned: Silence a static checker warning

2019-04-10 Thread Dan Carpenter
) but blk_queue_zone_sectors(q) returns a u32 so the higher 32 bits in aligned_capacity are cleared to zero. This patch adds a cast to address the issue. Fixes: 114e025968b5 ("dm zoned: ignore last smaller runt zone") Signed-off-by: Dan Carpenter --- v2: The v1 patch declared blk_queue_zone_s

Re: [dm-devel] [PATCH v2] dm zoned: Silence a static checker warning

2019-04-10 Thread Dan Carpenter
On Wed, Apr 10, 2019 at 07:56:14AM +, Damien Le Moal wrote: > On 2019/04/10 16:48, Dan Carpenter wrote: > > My static checker complains about this line from dmz_get_zoned_device() > > > > aligned_capacity = dev->capacity & ~(blk_queue_zone_sectors(q

[dm-devel] [PATCH v2] dm zoned: Silence a static checker warning

2019-04-10 Thread Dan Carpenter
ne_sectors(q) returns a u32 so the higher 32 bits in "aligned_capacity" are always cleared to zero. This patch adds a cast to u64 to address this issue. Fixes: 114e025968b5 ("dm zoned: ignore last smaller runt zone") Signed-off-by: Dan Carpenter --- v2: In v1 I changed blk_queue_zon

Re: [dm-devel] [bug report] dm verity: add support for forward error correction

2018-09-26 Thread Dan Carpenter
On Tue, Sep 25, 2018 at 09:03:40AM -0700, Sami Tolvanen wrote: > On Tue, Sep 25, 2018 at 5:07 AM Dan Carpenter > wrote: > > The patch a739ff3f543a: "dm verity: add support for forward error > > correction" from Dec 3, 2015, leads to the following static checker >

[dm-devel] [bug report] dm verity: add support for forward error correction

2018-09-25 Thread Dan Carpenter
goto done; 159 160 /* read the next block when we run out of parity bytes */ 161 offset += v->fec->roots; 162 if (offset >= 1 << v->data_dev_block_bits) { 163 dm_bufio_release(buf); 164

[dm-devel] [bug report] dm verity: add support for forward error correction

2018-06-14 Thread Dan Carpenter
70 done: 171 r = corrected; regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [PATCH] dm: writecache: fix autocommit_time option

2018-06-07 Thread Dan Carpenter
The option is in terms of msecs so we should be using msecs_to_jiffies() to convert it instead of the other way around. Fixes: 1be8d9c3da01 ("dm: add writecache target") Signed-off-by: Dan Carpenter diff --git a/drivers/md/dm-writecache.c b/drivers/md/dm-writecache.c index f2

[dm-devel] [bug report] dm: add writecache target

2018-05-30 Thread Dan Carpenter
ror = "Could not allocate writeback workqueue"; 1885 goto bad; 1886 } regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

Re: [dm-devel] [bug report] dm: add statistics support

2018-03-16 Thread Dan Carpenter
Parsing seems like an essential thing, but you'd be surprised how many times you can get away with parsing them badly. The main issue is that parsing them correctly is probably a big slow down because you'd have to go through a lot of code twice... Anyway, thanks for looking at this and sorry for the noise

Re: [dm-devel] [bug report] dm: add statistics support

2018-03-16 Thread Dan Carpenter
On Fri, Mar 16, 2018 at 01:52:20PM +0300, Dan Carpenter wrote: > Gar. I'm sorry, this is really new code and you're right that it's > buggy. > > On Thu, Mar 15, 2018 at 03:25:52PM -0400, Mikulas Patocka wrote: > > > The patch fd2ed4d25270: "dm: add statistics suppor

[dm-devel] [bug report] dm: add statistics support

2018-03-15 Thread Dan Carpenter
>mutex); 380 381 resume_callback(md); 382 383 return ret_id; 384 385 out_unlock_resume: 386 mutex_unlock(>mutex); 387 resume_callback(md); 388 out: 389 dm_stat_free(>rcu_head); 390 return r; 391

[dm-devel] [PATCH] dm mpath: potential NULL dereference with parse_path()

2018-01-06 Thread Dan Carpenter
We forgot to set the error code on this path so it means we accidentally return NULL. The caller is expecting error pointers and will crash with a NULL dereference. Fixes: faf782b1c93d ("dm mpath: optimize NVMe bio-based support") Signed-off-by: Dan Carpenter <dan.carpen...@orac

[dm-devel] [PATCH] dm bufio: Fix error code in dm_bufio_write_dirty_buffers()

2017-07-12 Thread Dan Carpenter
4e4cbee93d56 ("block: switch bios to blk_status_t") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/md/dm-bufio.c b/drivers/md/dm-bufio.c index 850ff6c67994..44f4a8ac95bd 100644 --- a/drivers/md/dm-bufio.c +++ b/drivers/md/dm-bufio.c @@ -1258,8

[dm-devel] [PATCH] block: missing break in process_queued_bios()

2017-06-14 Thread Dan Carpenter
This used to be a fall through case, but we shifted code around and I think we want a break here now. Fixes: 4e4cbee93d56 ("block: switch bios to blk_status_t") Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c in

[dm-devel] [PATCH] dm crypt: remove an impossible condition

2017-03-17 Thread Dan Carpenter
ter in the string so the check is unnecessary and can be removed. Now that the check doesn't depend on "sval" it can be moved earlier for readability. Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/md/dm-crypt.c b/drivers/md/dm-crypt.c index ec09bd7

[dm-devel] [bug report] dm crypt: add cryptographic data integrity protection (authenticated encryption)

2017-03-13 Thread Dan Carpenter
ffer_pages(cc, clone); 1392 bio_put(clone); regards, dan carpenter -- dm-devel mailing list dm-devel@redhat.com https://www.redhat.com/mailman/listinfo/dm-devel

[dm-devel] [bug report] dm: add integrity target

2017-03-13 Thread Dan Carpenter
^ Impossible! Also this line is really really really long so it doesn't even fit in my email client. It's like a million characters long. 2654 r = -EINVAL; 2655 ti->error = "Invalid interleave_sectors in the superb

[dm-devel] [patch] dm: check for kmalloc failure in dm_init_request_based_blk_mq_queue()

2016-02-09 Thread Dan Carpenter
We can just return -ENOMEM if the kzalloc() fails. Fixes: 41b2facaf4ba ('dm: allocate blk_mq_tag_set rather than embed in mapped_device') Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 6b7e80e..1a5f879 100644 --- a/drivers/m