From: Paulo Miguel Almeida <paulo.miguel.almeida.rodenas@gmail.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: realwakka@gmail.com, linux-staging@lists.linux.dev,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] staging: pi433: add comment to rx_lock mutex definition
Date: Fri, 31 Dec 2021 03:56:21 +1300 [thread overview]
Message-ID: <20211230145621.GA3236@localhost.localdomain> (raw)
In-Reply-To: <Yc2QYUcIAV2SY9JU@kroah.com>
On Thu, Dec 30, 2021 at 11:56:33AM +0100, Greg KH wrote:
> On Thu, Dec 23, 2021 at 10:56:15AM +1300, Paulo Miguel Almeida wrote:
> > + /*
> > + * rx_lock is used to avoid race-conditions that can be triggered from userspace.
> > + *
> > + * For instance, if a program in userspace is reading the char device
> > + * allocated in this module then another program won't be able to change RX
> > + * configuration of the RF69 hardware module via ioctl and vice versa.
> > + *
> > + * utilization summary:
> > + * - pi433_read: blocks are read until rx read something (up to the buffer size)
> > + * - pi433_ioctl: during pending read request, change of config not allowed
> > + */
>
> This is nice, but way too specific, and will quickly get out-of-date.
>
> How about something simple like:
> /* Protects all rx_* variable accesses */
>
I see your point. I will send a new version of this patch with your
sugestion. Thanks for guidance.
thanks,
Paulo A.
prev parent reply other threads:[~2021-12-30 14:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-22 21:56 [PATCH v2] staging: pi433: add comment to rx_lock mutex definition Paulo Miguel Almeida
2021-12-30 10:56 ` Greg KH
2021-12-30 14:56 ` Paulo Miguel Almeida [this message]
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=20211230145621.GA3236@localhost.localdomain \
--to=paulo.miguel.almeida.rodenas@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=realwakka@gmail.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