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]
Date:   Tue, 26 Nov 2019 21:05:39 -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 1/4] b43legacy: Fix -Wcast-function-type

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

Thanks for sending these!

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

-Kees

> ---
>  drivers/net/wireless/broadcom/b43legacy/main.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/net/wireless/broadcom/b43legacy/main.c b/drivers/net/wireless/broadcom/b43legacy/main.c
> index 4325e91736eb..8b6b657c4b85 100644
> --- a/drivers/net/wireless/broadcom/b43legacy/main.c
> +++ b/drivers/net/wireless/broadcom/b43legacy/main.c
> @@ -1275,8 +1275,9 @@ static void handle_irq_ucode_debug(struct b43legacy_wldev *dev)
>  }
>  
>  /* Interrupt handler bottom-half */
> -static void b43legacy_interrupt_tasklet(struct b43legacy_wldev *dev)
> +static void b43legacy_interrupt_tasklet(unsigned long data)
>  {
> +	struct b43legacy_wldev *dev = (struct b43legacy_wldev *)data;
>  	u32 reason;
>  	u32 dma_reason[ARRAY_SIZE(dev->dma_reason)];
>  	u32 merged_dma_reason = 0;
> @@ -3741,7 +3742,7 @@ static int b43legacy_one_core_attach(struct ssb_device *dev,
>  	b43legacy_set_status(wldev, B43legacy_STAT_UNINIT);
>  	wldev->bad_frames_preempt = modparam_bad_frames_preempt;
>  	tasklet_init(&wldev->isr_tasklet,
> -		     (void (*)(unsigned long))b43legacy_interrupt_tasklet,
> +		     b43legacy_interrupt_tasklet,
>  		     (unsigned long)wldev);
>  	if (modparam_pio)
>  		wldev->__using_pio = true;
> -- 
> 2.20.1
> 

-- 
Kees Cook

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ