* [PATCH net-next] ieee802154: hwsim: fix rcu address annotation
@ 2018-08-07 14:34 Alexander Aring
2018-08-07 15:28 ` Stefan Schmidt
0 siblings, 1 reply; 3+ messages in thread
From: Alexander Aring @ 2018-08-07 14:34 UTC (permalink / raw)
To: netdev; +Cc: linux-wpan, kernel, Alexander Aring, Stefan Schmidt
This patch fixes the following sparse warning about mismatch rcu
attribute for address space annotation:
...
error: incompatible types in comparison expression (different modifiers)
error: incompatible types in comparison expression (different address spaces)
...
Some __rcu annotation was at non-pointers list head structures and one was
missing in edge information which is used by rcu_assign_pointer() to
update edge setting information.
Cc: Stefan Schmidt <stefan@datenfreihafen.org>
Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
Signed-off-by: Alexander Aring <aring@mojatatu.com>
---
Hopefully I did it right now. Sorry again.
drivers/net/ieee802154/mac802154_hwsim.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c
index 1982308b9b1c..f4e92054f7df 100644
--- a/drivers/net/ieee802154/mac802154_hwsim.c
+++ b/drivers/net/ieee802154/mac802154_hwsim.c
@@ -36,7 +36,7 @@ MODULE_LICENSE("GPL");
static LIST_HEAD(hwsim_phys);
static DEFINE_MUTEX(hwsim_phys_lock);
-static __rcu LIST_HEAD(hwsim_ifup_phys);
+static LIST_HEAD(hwsim_ifup_phys);
static struct platform_device *mac802154hwsim_dev;
@@ -68,7 +68,7 @@ struct hwsim_edge_info {
struct hwsim_edge {
struct hwsim_phy *endpoint;
- struct hwsim_edge_info *info;
+ struct hwsim_edge_info __rcu *info;
struct list_head list;
struct rcu_head rcu;
@@ -81,7 +81,7 @@ struct hwsim_phy {
struct hwsim_pib __rcu *pib;
bool suspended;
- struct list_head __rcu edges;
+ struct list_head edges;
struct list_head list;
struct list_head list_ifup;
--
2.11.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] ieee802154: hwsim: fix rcu address annotation
2018-08-07 14:34 [PATCH net-next] ieee802154: hwsim: fix rcu address annotation Alexander Aring
@ 2018-08-07 15:28 ` Stefan Schmidt
2018-08-07 16:09 ` David Miller
0 siblings, 1 reply; 3+ messages in thread
From: Stefan Schmidt @ 2018-08-07 15:28 UTC (permalink / raw)
To: Alexander Aring, netdev; +Cc: linux-wpan, kernel
Hello Dave.
On 08/07/2018 04:34 PM, Alexander Aring wrote:
> This patch fixes the following sparse warning about mismatch rcu
> attribute for address space annotation:
>
> ...
> error: incompatible types in comparison expression (different modifiers)
> error: incompatible types in comparison expression (different address spaces)
> ...
>
> Some __rcu annotation was at non-pointers list head structures and one was
> missing in edge information which is used by rcu_assign_pointer() to
> update edge setting information.
>
> Cc: Stefan Schmidt <stefan@datenfreihafen.org>
> Fixes: f25da51fdc38 ("ieee802154: hwsim: add replacement for fakelb")
> Signed-off-by: Alexander Aring <aring@mojatatu.com>
> ---
> Hopefully I did it right now. Sorry again.
>
> drivers/net/ieee802154/mac802154_hwsim.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ieee802154/mac802154_hwsim.c b/drivers/net/ieee802154/mac802154_hwsim.c
> index 1982308b9b1c..f4e92054f7df 100644
> --- a/drivers/net/ieee802154/mac802154_hwsim.c
> +++ b/drivers/net/ieee802154/mac802154_hwsim.c
> @@ -36,7 +36,7 @@ MODULE_LICENSE("GPL");
> static LIST_HEAD(hwsim_phys);
> static DEFINE_MUTEX(hwsim_phys_lock);
>
> -static __rcu LIST_HEAD(hwsim_ifup_phys);
> +static LIST_HEAD(hwsim_ifup_phys);
>
> static struct platform_device *mac802154hwsim_dev;
>
> @@ -68,7 +68,7 @@ struct hwsim_edge_info {
>
> struct hwsim_edge {
> struct hwsim_phy *endpoint;
> - struct hwsim_edge_info *info;
> + struct hwsim_edge_info __rcu *info;
>
> struct list_head list;
> struct rcu_head rcu;
> @@ -81,7 +81,7 @@ struct hwsim_phy {
> struct hwsim_pib __rcu *pib;
>
> bool suspended;
> - struct list_head __rcu edges;
> + struct list_head edges;
>
> struct list_head list;
> struct list_head list_ifup;
>
Could you apply this patch directly to net-next?
It fixes an issue introduced with my pull request from two days ago. I
have nothing else to submit so I would appreciate if you could apply it
directly.
Signed-off-by: Stefan Schmidt <stefan@datenfreihafen.org>
regards
Stefan Schmidt
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-08-07 18:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-07 14:34 [PATCH net-next] ieee802154: hwsim: fix rcu address annotation Alexander Aring
2018-08-07 15:28 ` Stefan Schmidt
2018-08-07 16:09 ` David Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).