Re: [PATCH] [v2] ieee802154: ca8210: Fix a potential UAF in ca8210_probe

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> Missing Cc stable, this needs to be backported.

I will cc stable (stable@xxxxxxxxxxxxxxx) for the next version, thanks!
> > diff --git a/drivers/net/ieee802154/ca8210.c b/drivers/net/ieee802154/ca8210.c
> > index aebb19f1b3a4..b35c6f59bd1a 100644
> > --- a/drivers/net/ieee802154/ca8210.c
> > +++ b/drivers/net/ieee802154/ca8210.c
> > @@ -2759,7 +2759,6 @@ static int ca8210_register_ext_clock(struct spi_device *spi)
> >  	}
> >  	ret = of_clk_add_provider(np, of_clk_src_simple_get, priv->clk);
> >  	if (ret) {
> > -		clk_unregister(priv->clk);
> >  		dev_crit(
> >  			&spi->dev,
> >  			"Failed to register external clock as clock provider\n"
> 
> I was hoping you would simplify this function a bit more.

I understand. In the next patch version, I will just return of_clk_add_provider(). 

> 
> > @@ -2780,7 +2779,7 @@ static void ca8210_unregister_ext_clock(struct spi_device *spi)
> >  {
> >  	struct ca8210_priv *priv = spi_get_drvdata(spi);
> >  
> > -	if (!priv->clk)
> > +	if (IS_ERR_OR_NULL(priv->clk))
> >  		return
> >  
> >  	of_clk_del_provider(spi->dev.of_node);
> 
> Alex, Stefan, who handles wpan and wpan/next this release?
>
 
Is there any problem I need to handle in the next patch?

Regards,
Dinghao




[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux