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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20121224130801.GC6702@liondog.tnic>
Date:	Mon, 24 Dec 2012 14:08:01 +0100
From:	Borislav Petkov <bp@...en8.de>
To:	wei_wang@...lsil.com.cn
Cc:	cjb@...top.org, sameo@...ux.intel.com,
	devel@...uxdriverproject.org, linux-kernel@...r.kernel.org,
	linux-mmc@...r.kernel.org, gregkh@...uxfoundation.org,
	arnd@...db.de, oakad@...oo.com
Subject: Re: [PATCH 3/7] MFD:rtsx: Declare that the DMA address limitation is
 32bit explicitly

On Mon, Dec 24, 2012 at 02:03:30PM +0800, wei_wang@...lsil.com.cn wrote:
> From: Wei WANG <wei_wang@...lsil.com.cn>
> 
> Signed-off-by: Wei WANG <wei_wang@...lsil.com.cn>
> ---
>  drivers/mfd/rtsx_pcr.c |    4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/mfd/rtsx_pcr.c b/drivers/mfd/rtsx_pcr.c
> index fa2c2bc..2ee6be5 100644
> --- a/drivers/mfd/rtsx_pcr.c
> +++ b/drivers/mfd/rtsx_pcr.c
> @@ -1084,6 +1084,10 @@ static int __devinit rtsx_pci_probe(struct pci_dev *pcidev,
>  	pci_set_master(pcidev);
>  	synchronize_irq(pcr->irq);
>  
> +	ret = pci_set_dma_mask(pcidev, DMA_BIT_MASK(32));
> +	if (ret < 0)
> +		goto disable_irq;

This piece is deep down in rtsx_pci_probe() and if it fails, the _probe
function has do to all the error unwinding on the error path. Why not
push it up before the pci_enable_device(pcidev) call so in case it
fails, you can save yourself all the needless unwinding?

Oh, and ditto here, commit message is missing.

Thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ