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: <CAAFQd5BJnZg+=VqN-Atf2a0G8Y+KV2R-PmOQRMqFbppKrH-n4g@mail.gmail.com>
Date:   Mon, 20 Feb 2017 13:16:17 +0900
From:   Tomasz Figa <tfiga@...omium.org>
To:     Zain Wang <wzz@...k-chips.com>
Cc:     Sean Paul <seanpaul@...omium.org>,
        Daniel Vetter <daniel.vetter@...ll.ch>,
        Inki Dae <inki.dae@...sung.com>,
        David Airlie <airlied@...ux.ie>,
        Tomeu Vizoso <tomeu.vizoso@...labora.com>,
        Mika Kahola <mika.kahola@...el.com>,
        Stéphane Marchesin <marcheu@...omium.org>,
        Douglas Anderson <dianders@...omium.org>,
        Thierry Reding <treding@...dia.com>,
        Heiko Stuebner <heiko@...ech.de>,
        Jingoo Han <jingoohan1@...il.com>,
        Javier Martinez Canillas <javier@....samsung.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        dri-devel <dri-devel@...ts.freedesktop.org>,
        linux-samsung-soc <linux-samsung-soc@...r.kernel.org>,
        "open list:ARM/Rockchip SoC..." <linux-rockchip@...ts.infradead.org>
Subject: Re: [PATCH] drm/bridge: analogix_dp: Don't return -EBUSY when
 msg->size is 0 in aux transaction

On Mon, Feb 20, 2017 at 1:04 PM, Zain Wang <wzz@...k-chips.com> wrote:
> 在 2017/2/20 10:40, Tomasz Figa 写道:
>> On Mon, Feb 13, 2017 at 6:27 PM, zain wang <wzz@...k-chips.com> wrote:
>>> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
>>> b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
>>> index 303083a..5384aca 100644
>>> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
>>> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
>>> @@ -1162,5 +1162,5 @@ ssize_t analogix_dp_transfer(struct
>>> analogix_dp_device *dp,
>>>                   (msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_NATIVE_READ)
>>>                  msg->reply = DP_AUX_NATIVE_REPLY_ACK;
>>>
>>> -       return num_transferred > 0 ? num_transferred : -EBUSY;
>>> +       return (num_transferred == msg->size) ? num_transferred : -EBUSY;
>>
>> I might be missing something but, looking at the code, I don't see any
>> possibility of num_transferred ever being different than msg->size. To
>> be honest, it doesn't seem to even make any sense keeping the local
>> variable there, because msg->size can be simply always returned, as
>> errors are handled by jumping to aux_error label.
>
> Yeah, I agree with you.
> The better way to fix this issue is to revert the changes
> https://patchwork.kernel.org/patch/9411711/
> (returning num_transferred directly may be better here)

I think it's still not enough to clean up the code completely. It
should be just enough to remove num_transferred completely and simply
return msg->size at the end.

Best regards,
Tomasz

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ