lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d524e3d7-69e2-0267-b9ef-b4dc576e6c55@redhat.com>
Date: Mon, 21 Jul 2025 11:15:16 +0200 (CEST)
From: Mikulas Patocka <mpatocka@...hat.com>
To: Pavel Tikhomirov <ptikhomirov@...tuozzo.com>
cc: Alasdair Kergon <agk@...hat.com>, Mike Snitzer <snitzer@...nel.org>, 
    Xiao Ni <xni@...hat.com>, Yu Kuai <yukuai3@...wei.com>, 
    dm-devel@...ts.linux.dev, linux-kernel@...r.kernel.org, 
    Konstantin Khorenko <khorenko@...tuozzo.com>, 
    Denis Lunev <den@...tuozzo.com>
Subject: Re: [PATCH] dm-raid: do not include dm-core.h



On Mon, 21 Jul 2025, Pavel Tikhomirov wrote:

> In commit 4cc96131afce ("dm: move request-based code out to dm-rq.[hc]")
> we have a note: "DM targets should _never_ include dm-core.h!". And it
> is not used in any DM targets except dm-raid now, so let's remove it
> from dm-raid for consistency, also use special helpers instead of
> accessing dm_table and mapper_device fields directly. This change is
> merely a cleanup and should not affect functionality.
> 
> Fixes: 7168be3c8a6b ("md: record dm-raid gendisk in mddev")
> Signed-off-by: Pavel Tikhomirov <ptikhomirov@...tuozzo.com>
> ---
>  drivers/md/dm-raid.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c
> index e8c0a8c6fb51..4fb5ddf50560 100644
> --- a/drivers/md/dm-raid.c
> +++ b/drivers/md/dm-raid.c
> @@ -14,7 +14,6 @@
>  #include "raid5.h"
>  #include "raid10.h"
>  #include "md-bitmap.h"
> -#include "dm-core.h"
>  
>  #include <linux/device-mapper.h>
>  
> @@ -3305,7 +3304,7 @@ static int raid_ctr(struct dm_target *ti, unsigned int argc, char **argv)
>  
>  	/* Disable/enable discard support on raid set. */
>  	configure_discard_support(rs);
> -	rs->md.dm_gendisk = ti->table->md->disk;
> +	rs->md.dm_gendisk = dm_disk(dm_table_get_md(ti->table));
>  
>  	mddev_unlock(&rs->md);
>  	return 0;
> -- 
> 2.50.0
> 

Applied, thanks.

(I deleted the Fixes line, because it is not really a bugfix and it 
doesn't have to be backported to the stable kernel branches)

Mikulas


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ