From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: "Thomas Weißschuh" <linux@weissschuh.net>
Cc: Arnd Bergmann <arnd@arndb.de>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] misc/pvpanic: deduplicate comomn code
Date: Wed, 11 Oct 2023 08:32:40 +0200 [thread overview]
Message-ID: <2023101113-squatter-stew-5d66@gregkh> (raw)
In-Reply-To: <20231011-pvpanic-cleanup-v1-1-5c93b05ec331@weissschuh.net>
On Wed, Oct 11, 2023 at 12:10:08AM +0200, Thomas Weißschuh wrote:
> +int devm_pvpanic_probe(struct device *dev, void __iomem *base)
> +{
> + struct pvpanic_instance *pi;
> + int ret;
> +
> + if (!base)
> + return -EINVAL;
> +
> + ret = devm_device_add_groups(dev, pvpanic_dev_groups);
You just raced with userspace and lost :(
Please just use the default groups attribute pointer, you should NEVER
need to manually add groups to a device like this.
And why are you calling this devm_*() for a probe function? That's
risky as you are now in the global namespace and this really is not a
devm_*() like function
thanks,
greg k-h
prev parent reply other threads:[~2023-10-11 6:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-10-10 22:10 [PATCH] misc/pvpanic: deduplicate comomn code Thomas Weißschuh
2023-10-11 6:32 ` Greg Kroah-Hartman [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=2023101113-squatter-stew-5d66@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@weissschuh.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.