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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20171122212847.axib6ito23sldlbe@ltop.local>
Date:   Wed, 22 Nov 2017 22:28:48 +0100
From:   Luc Van Oostenryck <luc.vanoostenryck@...il.com>
To:     Matthew Wilcox <willy@...radead.org>
Cc:     linux-fsdevel@...r.kernel.org, linux-mm@...ck.org,
        linux-kernel@...r.kernel.org,
        Matthew Wilcox <mawilcox@...rosoft.com>
Subject: Re: [PATCH 05/62] radix tree: Add a missing cast to gfp_t

On Wed, Nov 22, 2017 at 01:06:42PM -0800, Matthew Wilcox wrote:
> From: Matthew Wilcox <mawilcox@...rosoft.com>
> 
> sparse complains about an invalid type assignment.
> 
> Signed-off-by: Matthew Wilcox <mawilcox@...rosoft.com>
> ---
>  lib/radix-tree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/lib/radix-tree.c b/lib/radix-tree.c
> index c8d55565fafa..f00303e0b216 100644
> --- a/lib/radix-tree.c
> +++ b/lib/radix-tree.c
> @@ -178,7 +178,7 @@ static inline void root_tag_clear(struct radix_tree_root *root, unsigned tag)
>  
>  static inline void root_tag_clear_all(struct radix_tree_root *root)
>  {
> -	root->gfp_mask &= (1 << ROOT_TAG_SHIFT) - 1;
> +	root->gfp_mask &= (__force gfp_t)((1 << ROOT_TAG_SHIFT) - 1);
>  }
>  
>  static inline int root_tag_get(const struct radix_tree_root *root, unsigned tag)
> -- 

IMO, it would be better to define something for that in radix-tree.h,
like it has been done for ROOT_IS_IDR.

Regards,
-- Luc

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ