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: <75747efd-2bfd-d1db-42d9-7a6c90240475@kernel.org>
Date:   Tue, 30 May 2023 07:35:47 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Jacky Huang <ychuang570808@...il.com>, robh+dt@...nel.org,
        krzysztof.kozlowski+dt@...aro.org, lee@...nel.org,
        mturquette@...libre.com, sboyd@...nel.org, p.zabel@...gutronix.de,
        gregkh@...uxfoundation.org, tmaimon77@...il.com,
        catalin.marinas@....com, will@...nel.org
Cc:     devicetree@...r.kernel.org, linux-clk@...r.kernel.org,
        linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
        linux-serial@...r.kernel.org, arnd@...db.de, soc@...nel.org,
        schung@...oton.com, mjchen@...oton.com,
        Jacky Huang <ychuang3@...oton.com>
Subject: Re: [PATCH v11 10/10] tty: serial: Add Nuvoton ma35d1 serial driver
 support

Hi,

On 30. 05. 23, 3:09, Jacky Huang wrote:
>>>> +
>>>> +    if (options)
>>>> +        uart_parse_options(options, &baud, &parity, &bits, &flow);
>>>> +
>>>> +    return uart_set_options(port, co, baud, parity, bits, flow);
>>>> +}
>>>> +
>>>> +static struct console ma35d1serial_console = {
>>>> +    .name    = "ttyNVT",
>>>> +    .write   = ma35d1serial_console_write,
>>>> +    .device  = uart_console_device,
>>>> +    .setup   = ma35d1serial_console_setup,
>>>> +    .flags   = CON_PRINTBUFFER | CON_ENABLED,
>>>> +    .index   = -1,
>>>> +    .data    = &ma35d1serial_reg,
>>>
>>> I don't see console->data used anywhere in the driver?
>>>
>>
>> I will remove it.
>>
> 
> I removed the " .data    = &ma35d1serial_reg", but kernel crashed in 
> 'drivers/tty/serial/serial_core.c'.
> 
> The variable 'p' of  uart_console_device() refer to a NULL, because 
> co->data is NULL.
> As a result, kernel crashed at 'p->tty_driver'.
> 
> struct tty_driver *uart_console_device(struct console *co, int *index)
> {
>      struct uart_driver *p = co->data;
>      *index = co->index;
>      return p->tty_driver;
> }
> 
> We seem to be unable to remove it.
> If there are no other considerations, I will keep it in the next version.

Ah, yeah. Sorry, my bad.

-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ