From: Andrew Jeffery <andrew@codeconstruct.com.au>
To: Karthikeyan KS <karthiproffesional@gmail.com>
Cc: joel@jms.id.au, andrew@aj.id.au,
linux-arm-kernel@lists.infradead.org,
linux-aspeed@lists.ozlabs.org, linux-kernel@vger.kernel.org,
stable@vger.kernel.org
Subject: Re: [PATCH v3] soc: aspeed: lpc-snoop: Fix usercopy overflow in snoop_file_read
Date: Thu, 28 May 2026 12:09:34 +0930 [thread overview]
Message-ID: <1e2b77c7916259e3e269d19f637c29427c175350.camel@codeconstruct.com.au> (raw)
In-Reply-To: <20260527175939.2939714-1-karthiproffesional@gmail.com>
Hi Karthikeyan,
On Wed, 2026-05-27 at 17:59 +0000, Karthikeyan KS wrote:
> diff --git a/drivers/soc/aspeed/aspeed-lpc-snoop.c b/drivers/soc/aspeed/aspeed-lpc-snoop.c
> index eceeaf8df..ef6697a42 100644
> --- a/drivers/soc/aspeed/aspeed-lpc-snoop.c
> +++ b/drivers/soc/aspeed/aspeed-lpc-snoop.c
> @@ -60,6 +60,7 @@ struct aspeed_lpc_snoop_model_data {
>
> struct aspeed_lpc_snoop_channel {
> struct kfifo fifo;
> + spinlock_t lock;
> wait_queue_head_t wq;
> struct miscdevice miscdev;
> };
> @@ -93,7 +94,11 @@ static ssize_t snoop_file_read(struct file *file, char __user *buffer,
> if (ret == -ERESTARTSYS)
> return -EINTR;
> }
> +
> + spin_lock_irq(&chan->lock);
> ret = kfifo_to_user(&chan->fifo, buffer, count, &copied);
> + spin_unlock_irq(&chan->lock);
This seems inappropriate and I expect is flagged if you compile with
CONFIG_PROVE_LOCKING=y or CONFIG_DEBUG_ATOMIC_SLEEP=y. I suggest both
if you're not already.
Further, I hit conflicts when applying your change on v7.1-rc5. Can you
please ensure you develop, build and test on recent releases.
Thanks,
Andrew
next prev parent reply other threads:[~2026-05-28 2:39 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <CAP_JKPter_ggMMvUY=pDZyZupSQb5KWGVPeig41Uw2wBDXepMg@mail.gmail.com>
2026-05-18 11:14 ` [PATCH] " Andrew Jeffery
2026-05-23 17:35 ` [PATCH v2] " Karthikeyan KS
2026-05-27 3:53 ` Andrew Jeffery
2026-05-27 17:59 ` [PATCH v3] " Karthikeyan KS
2026-05-28 2:39 ` Andrew Jeffery [this message]
2026-06-01 12:52 ` [PATCH v4] " Karthikeyan KS
2026-06-10 2:26 ` Andrew Jeffery
2026-06-10 17:23 ` [PATCH v5] " Karthikeyan KS
2026-06-11 2:50 ` Andrew Jeffery
[not found] ` <CAP_JKPu9MTpMUZmg9BY3sxGhmBzgR0E6HnvAT7sQjVUpQp0dSQ@mail.gmail.com>
2026-06-12 0:39 ` Andrew Jeffery
2026-06-11 18:08 ` Karthikeyan KS
2026-06-12 19:07 ` [PATCH v6] " Karthikeyan KS
2026-06-16 0:20 ` Andrew Jeffery
2026-07-22 12:48 ` Andrew Jeffery
2026-06-16 7:30 ` Karthikeyan KS
2026-06-17 0:44 ` Andrew Jeffery
2026-06-17 13:10 ` Karthikeyan KS
2026-06-18 0:44 ` Andrew Jeffery
2026-06-20 13:11 ` Karthikeyan KS
2026-07-01 17:15 ` Karthikeyan KS
2026-07-02 0:25 ` Andrew Jeffery
2026-07-02 17:35 ` Karthikeyan KS
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=1e2b77c7916259e3e269d19f637c29427c175350.camel@codeconstruct.com.au \
--to=andrew@codeconstruct.com.au \
--cc=andrew@aj.id.au \
--cc=joel@jms.id.au \
--cc=karthiproffesional@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-aspeed@lists.ozlabs.org \
--cc=linux-kernel@vger.kernel.org \
--cc=stable@vger.kernel.org \
/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®