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: <201911262105.E50C54F@keescook>
Date:   Tue, 26 Nov 2019 21:05:48 -0800
From:   Kees Cook <keescook@...omium.org>
To:     Phong Tran <tranmanphong@...il.com>
Cc:     Larry.Finger@...inger.net, jakub.kicinski@...ronome.com,
        kvalo@...eaurora.org, Wright.Feng@...ress.com,
        arend.vanspriel@...adcom.com, davem@...emloft.net,
        emmanuel.grumbach@...el.com, franky.lin@...adcom.com,
        johannes.berg@...el.com, linux-kernel@...r.kernel.org,
        linux-wireless@...r.kernel.org, luciano.coelho@...el.com,
        netdev@...r.kernel.org, p.figiel@...lintechnologies.com,
        pieter-paul.giesberts@...adcom.com, pkshih@...ltek.com,
        rafal@...ecki.pl, sara.sharon@...el.com,
        shahar.s.matityahu@...el.com, yhchuang@...ltek.com,
        yuehaibing@...wei.com
Subject: Re: [Patch v2 3/4] iwlegacy: Fix -Wcast-function-type

On Wed, Nov 27, 2019 at 12:55:28AM +0700, Phong Tran wrote:
> correct usage prototype of callback in tasklet_init().
> Report by https://github.com/KSPP/linux/issues/20
> 
> Signed-off-by: Phong Tran <tranmanphong@...il.com>

Reviewed-by: Kees Cook <keescook@...omium.org>

-Kees

> ---
>  drivers/net/wireless/intel/iwlegacy/3945-mac.c | 5 +++--
>  drivers/net/wireless/intel/iwlegacy/4965-mac.c | 5 +++--
>  2 files changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/net/wireless/intel/iwlegacy/3945-mac.c b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> index 4fbcc7fba3cc..e2e9c3e8fff5 100644
> --- a/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> +++ b/drivers/net/wireless/intel/iwlegacy/3945-mac.c
> @@ -1376,8 +1376,9 @@ il3945_dump_nic_error_log(struct il_priv *il)
>  }
>  
>  static void
> -il3945_irq_tasklet(struct il_priv *il)
> +il3945_irq_tasklet(unsigned long data)
>  {
> +	struct il_priv *il = (struct il_priv *)data;
>  	u32 inta, handled = 0;
>  	u32 inta_fh;
>  	unsigned long flags;
> @@ -3403,7 +3404,7 @@ il3945_setup_deferred_work(struct il_priv *il)
>  	timer_setup(&il->watchdog, il_bg_watchdog, 0);
>  
>  	tasklet_init(&il->irq_tasklet,
> -		     (void (*)(unsigned long))il3945_irq_tasklet,
> +		     il3945_irq_tasklet,
>  		     (unsigned long)il);
>  }
>  
> diff --git a/drivers/net/wireless/intel/iwlegacy/4965-mac.c b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
> index ffb705b18fb1..5fe17039a337 100644
> --- a/drivers/net/wireless/intel/iwlegacy/4965-mac.c
> +++ b/drivers/net/wireless/intel/iwlegacy/4965-mac.c
> @@ -4344,8 +4344,9 @@ il4965_synchronize_irq(struct il_priv *il)
>  }
>  
>  static void
> -il4965_irq_tasklet(struct il_priv *il)
> +il4965_irq_tasklet(unsigned long data)
>  {
> +	struct il_priv *il = (struct il_priv *)data;
>  	u32 inta, handled = 0;
>  	u32 inta_fh;
>  	unsigned long flags;
> @@ -6238,7 +6239,7 @@ il4965_setup_deferred_work(struct il_priv *il)
>  	timer_setup(&il->watchdog, il_bg_watchdog, 0);
>  
>  	tasklet_init(&il->irq_tasklet,
> -		     (void (*)(unsigned long))il4965_irq_tasklet,
> +		     il4965_irq_tasklet,
>  		     (unsigned long)il);
>  }
>  
> -- 
> 2.20.1
> 

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ