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
.
regards,
dan carpenter
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
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
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
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
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:
: 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
--
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
/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
/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
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)
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
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
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
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
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
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
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
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
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
) 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
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
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
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
>
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
70 done:
171 r = corrected;
regards,
dan carpenter
--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel
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
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
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
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
>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
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
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
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
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
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
^
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
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
38 matches
Mail list logo