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] [day] [month] [year] [list]
Message-ID: <430c447a-bf8f-6268-9d55-e29ada539ea2@gmail.com>
Date:	Tue, 28 Jun 2016 08:51:38 +0800
From:	"Ji-Ze Hong (Peter Hong)" <hpeter@...il.com>
To:	Ricardo Ribalda Delgado <ricardo.ribalda@...il.com>
Cc:	Greg Kroah-Hartman <gregkh@...uxfoundation.org>, jslaby@...e.com,
	Alan Cox <alan@...ux.intel.com>,
	Peter Hurley <peter@...leysoftware.com>,
	PA20 TOM TSAI 蔡宗佑 
	<tom_tsai@...tek.com.tw>, Peter H <peter_hong@...tek.com.tw>,
	linux-serial@...r.kernel.org, LKML <linux-kernel@...r.kernel.org>,
	"Ji-Ze Hong (Peter Hong)" <hpeter+linux_kernel@...il.com>
Subject: Re: [PATCH] serial: 8250_fintek: fix the mismatched IRQ mode

Hi Ricardo & Greg,

Ricardo Ribalda Delgado 於 2016/6/27 下午 06:25 寫道:
> Hi Peter,. Hi Greg
> On Fri, May 27, 2016 at 4:02 AM, Ji-Ze Hong (Peter Hong)
>> +       struct irq_data *irq_data = irq_get_irq_data(uart->port.irq);
>> +       bool level_mode = irqd_is_level_type(irq_data);
>
> I see a potential problem with this patch:
>
> If irq_get_irq_data fails, it will return NULL, resulting on a
> segmentation fault on irqd_is_level_type:
>
> #define __irqd_to_state(d) ACCESS_PRIVATE((d)->common, state_use_accessors)
>
>
> I believe that we need to add error checks here

I'll try to send a patch to add more checks.

>> -       return 0;
>> +       return fintek_8250_set_irq_mode(pdata, level_mode);
>
> Also why do not call irq_get_irq_data() and  irqd_is_level_type()
> before return? There is no need to do that work if the probe
> determines that it is not a fintek chip.
>

Also determine the IRQ mode when found a fintek chip.

Thanks to point out the potential issue.
-- 
With Best Regards,
Peter Hung

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ