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: <20160128150538.1ba8fc7c@recife.lan>
Date:	Thu, 28 Jan 2016 15:05:38 -0200
From:	Mauro Carvalho Chehab <mchehab@....samsung.com>
To:	Shuah Khan <shuahkh@....samsung.com>
Cc:	tiwai@...e.com, clemens@...isch.de, hans.verkuil@...co.com,
	laurent.pinchart@...asonboard.com, sakari.ailus@...ux.intel.com,
	javier@....samsung.com, pawel@...iak.com, m.szyprowski@...sung.com,
	kyungmin.park@...sung.com, perex@...ex.cz, arnd@...db.de,
	dan.carpenter@...cle.com, tvboxspy@...il.com, crope@....fi,
	ruchandani.tina@...il.com, corbet@....net, chehabrafael@...il.com,
	k.kozlowski@...sung.com, stefanr@...6.in-berlin.de,
	inki.dae@...sung.com, jh1009.sung@...sung.com,
	elfring@...rs.sourceforge.net, prabhakar.csengg@...il.com,
	sw0312.kim@...sung.com, p.zabel@...gutronix.de,
	ricardo.ribalda@...il.com, labbott@...oraproject.org,
	pierre-louis.bossart@...ux.intel.com, ricard.wanderlof@...s.com,
	julian@...st.de, takamichiho@...il.com, dominic.sacre@....de,
	misterpib@...il.com, daniel@...que.org, gtmkramer@...all.nl,
	normalperson@...t.net, joe@...po.co.uk, linuxbugs@...tgam.net,
	johan@...ud.se, linux-kernel@...r.kernel.org,
	linux-media@...r.kernel.org, linux-api@...r.kernel.org,
	alsa-devel@...a-project.org
Subject: Re: [PATCH 31/31] media: au0828 change to check media device
 unregister progress state

Em Wed,  6 Jan 2016 13:27:20 -0700
Shuah Khan <shuahkh@....samsung.com> escreveu:

> Change au0828_unregister_media_device() to check media
> device media device unregister is in progress and avoid
> calling media_device_unregister() and other cleanup done
> in au0828_unregister_media_device().
> 
> Signed-off-by: Shuah Khan <shuahkh@....samsung.com>
> ---
>  drivers/media/usb/au0828/au0828-core.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/media/usb/au0828/au0828-core.c b/drivers/media/usb/au0828/au0828-core.c
> index 886fb28..de357a2 100644
> --- a/drivers/media/usb/au0828/au0828-core.c
> +++ b/drivers/media/usb/au0828/au0828-core.c
> @@ -136,7 +136,9 @@ static void au0828_unregister_media_device(struct au0828_dev *dev)
>  
>  #ifdef CONFIG_MEDIA_CONTROLLER
>  	if (dev->media_dev &&
> -		media_devnode_is_registered(&dev->media_dev->devnode)) {
> +		media_devnode_is_registered(&dev->media_dev->devnode) &&
> +		!media_device_is_unregister_in_progress(dev->media_dev)) {
> +

A kref would likely work better here.

>  		media_device_unregister(dev->media_dev);
>  		media_device_cleanup(dev->media_dev);
>  		dev->media_dev = NULL;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ