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]
Date:	Tue, 7 Jul 2015 15:58:43 +0300
From:	Roger Quadros <rogerq@...com>
To:	"Ivan T. Ivanov" <ivan.ivanov@...aro.org>
CC:	<cw00.choi@...sung.com>, <linux-omap@...r.kernel.org>,
	<linux-usb@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: Re: [PATCH 1/2] extcon: fix hang and extcon_get/set_cable_state().

Hi,

On 07/07/15 15:40, Ivan T. Ivanov wrote:
>
> On Mon, 2015-07-06 at 17:46 +0300, Roger Quadros wrote:
>
>>
>> -static int find_cable_index_by_name(struct extcon_dev *edev, const char *name)
>> +static int find_cable_id_by_name(struct extcon_dev *edev, const char *name)
>>   {
>> -       unsigned int id = EXTCON_NONE;
>> +       unsigned int id = -EINVAL;
>>          int i = 0;
>>
>> -       if (edev->max_supported == 0)
>> -               return -EINVAL;
>> -
>> -       /* Find the the number of extcon cable */
>> +       /* Find the id of extcon cable */
>>          while (extcon_name[i]) {
>>                  if (!strncmp(extcon_name[i], name, CABLE_NAME_MAX)) {
>>                          id = i;
>> @@ -140,6 +137,19 @@ static int find_cable_index_by_name(struct extcon_dev *edev, const char *name)
>>                  }
>>          }
>>
>
> Thank you Roger, but this still hang. 'i' is not incremented.

You are right. Thanks for pointing out.
I will send out a v2.

>
> Ivan
>
>> +       return id;
>> +};
>>

cheers,
-roger
--
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