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: <55F1BF7A.4000901@osg.samsung.com>
Date:	Thu, 10 Sep 2015 19:35:54 +0200
From:	Javier Martinez Canillas <javier@....samsung.com>
To:	Sakari Ailus <sakari.ailus@...ux.intel.com>,
	linux-kernel@...r.kernel.org
Cc:	Mauro Carvalho Chehab <mchehab@....samsung.com>,
	linux-media@...r.kernel.org
Subject: Re: [PATCH 1/2] [media] media-device: check before unregister if mdev
 was registered

Hello Sakari,

Thanks a lot for your feedback.

On 09/10/2015 07:15 PM, Sakari Ailus wrote:
> Javier Martinez Canillas wrote:
>> Most media functions that unregister, check if the corresponding register
>> function succeed before. So these functions can safely be called even if a
>> registration was never made or the component as already been unregistered.
>>
>> Add the same check to media_device_unregister() function for consistency.
>>
>> This will also allow to split the media_device_register() function in an
>> initialization and registration functions without the need to change the
>> generic cleanup functions and error code paths for all the media drivers.
>>
>> Suggested-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
>> Signed-off-by: Javier Martinez Canillas <javier@....samsung.com>
>> ---
>>
>>  drivers/media/media-device.c | 6 ++++++
>>  1 file changed, 6 insertions(+)
>>
>> diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c
>> index 1312e93ebd6e..745defb34b33 100644
>> --- a/drivers/media/media-device.c
>> +++ b/drivers/media/media-device.c
>> @@ -574,6 +574,8 @@ EXPORT_SYMBOL_GPL(__media_device_register);
>>   * media_device_unregister - unregister a media device
>>   * @mdev:	The media device
>>   *
>> + * If the media device has never been registered this function will
>> + * return immediately.
> 
> I'd say "It is safe to call this function on an unregistered (but
> initialised) media device.". Up to you.
>

Ok, I copied that message from media_device_unregister_entity() with
s/entity/media device so the kernel doc would be consistent but I don't
mind to change to your suggested message since looks more clear to me.
 
> Acked-by: Sakari Ailus <sakari.ailus@...ux.intel.com>
> 

Thanks!

Best regards,
-- 
Javier Martinez Canillas
Open Source Group
Samsung Research America
--
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