From: Vladimir Stankovic <vladimir.stankovic@displaylink.com>
To: Oliver Neukum <oneukum@suse.com>, Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
linux-usb <linux-usb@vger.kernel.org>,
mausb-host-devel <mausb-host-devel@displaylink.com>
Subject: Re: [External] Re: [PATCH v2 5/8] usb: mausb_host: Introduce PAL processing
Date: Thu, 27 Feb 2020 08:50:18 +0000 [thread overview]
Message-ID: <55d0673a-fd13-4afe-6dca-a98f058656c3@displaylink.com> (raw)
In-Reply-To: <1582720533.17520.26.camel@suse.com>
On 26.2.20. 13:35, Oliver Neukum wrote:
> Am Mittwoch, den 26.02.2020, 09:58 +0000 schrieb Vladimir Stankovic
>
> +int mausb_enqueue_event_from_user(u8 madev_addr, u16 num_of_events,
> + u16 num_of_completed)
> +{
> + unsigned long flags;
> + struct mausb_device *dev;
> +
> + spin_lock_irqsave(&mss.lock, flags);
>
> You save the flags.
>
> + dev = mausb_get_dev_from_addr_unsafe(madev_addr);
> +
> + if (!dev) {
> + spin_unlock_irqrestore(&mss.lock, flags);
> + return -EINVAL;
> + }
> +
> + spin_lock_irqsave(&dev->num_of_user_events_lock, flags);
>
> You overwrite the flags.
>
> + dev->num_of_user_events += num_of_events;
> + dev->num_of_completed_events += num_of_completed;
> + spin_unlock_irqrestore(&dev->num_of_user_events_lock, flags);
>
> Your restore the flags.
>
> + queue_work(dev->workq, &dev->work);
> + spin_unlock_irqrestore(&mss.lock, flags);
>
> You restore the overwritten flags.
>
> This cannot be right.
>
> Regards
> Oliver
>
You're right. We'll address this issue.
--
Regards,
Vladimir.
next prev parent reply other threads:[~2020-02-27 8:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-26 9:58 Vladimir Stankovic
2020-02-26 12:35 ` Oliver Neukum
2020-02-27 8:50 ` Vladimir Stankovic [this message]
2020-02-26 14:19 ` Oliver Neukum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55d0673a-fd13-4afe-6dca-a98f058656c3@displaylink.com \
--to=vladimir.stankovic@displaylink.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mausb-host-devel@displaylink.com \
--cc=oneukum@suse.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®