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: <20200304151316.GA2367@duo.ucw.cz>
Date:   Wed, 4 Mar 2020 16:13:16 +0100
From:   Pavel Machek <pavel@...x.de>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc:     linux-kernel@...r.kernel.org, stable@...r.kernel.org,
        Stephen Boyd <swboyd@...omium.org>,
        Sai Prakash Ranjan <saiprakash.ranjan@...eaurora.org>,
        Rob Clark <robdclark@...il.com>,
        Sean Paul <seanpaul@...omium.org>,
        Douglas Anderson <dianders@...omium.org>,
        Sasha Levin <sashal@...nel.org>
Subject: Re: [PATCH 4.19 04/87] drm/msm: Set dma maximum segment size for mdss

Hi!

> Turning on CONFIG_DMA_API_DEBUG_SG results in the following error:
> 
> [   12.078665] msm ae00000.mdss: DMA-API: mapping sg segment longer than device claims to support [len=3526656] [max=65536]
> [   12.089870] WARNING: CPU: 6 PID: 334 at
> /mnt/host/source/src/third_party/kernel/v4.19/kernel/dma/debug.c:1301
> debug_dma_map_sg+0x1dc/0x318

This one leaks resources in the (very improbable) case of error; it
needs to goto cleanup instead of simply returning.

> +++ b/drivers/gpu/drm/msm/msm_drv.c
> @@ -492,6 +492,14 @@ static int msm_drm_init(struct device *dev, struct drm_driver *drv)
>  	if (ret)
>  		goto err_msm_uninit;
>  
> +	if (!dev->dma_parms) {
> +		dev->dma_parms = devm_kzalloc(dev, sizeof(*dev->dma_parms),
> +					      GFP_KERNEL);
> +		if (!dev->dma_parms)
> +			return -ENOMEM;
> +	}
> +	dma_set_max_seg_size(dev, DMA_BIT_MASK(32));
> +
>  	msm_gem_shrinker_init(ddev);
>  

Best regards,
									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Download attachment "signature.asc" of type "application/pgp-signature" (196 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ