lkml.org 
[lkml]   [2020]   [May]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: BUG: stack guard page was hit in unwind_next_frame
On Sun, May 03, 2020 at 06:22:20PM +0800, Hillf Danton wrote:
> Bail out if it's detected to handle the event more than once.
>
> --- a/drivers/net/bonding/bond_main.c
> +++ b/drivers/net/bonding/bond_main.c
> @@ -3273,9 +3273,19 @@ static int bond_netdev_event(struct noti
> return ret;
> }
>
> - if (event_dev->flags & IFF_SLAVE)
> - return bond_slave_netdev_event(event, event_dev);
> + if (event_dev->flags & IFF_SLAVE) {
> + static void *tail_spin = NULL;
^^^^^^^^^^^^^^^^
assigning NULL

> + void *token = (void *) this + (void *) event_dev;

Adding a pointer to a pointer doesn't make any sense. But the result
is non-NULL because event_dev is non-NULL.

> +
> + if (tail_spin == token) {
^^^^^^^^^^^^^^^^^^
Impossible because tail_spin is NULL and token is non-NULL.

> + tail_spin = NULL;
^^^^^^^^^^^^^^^^
re-assigning NULL. local variable assigned right before a return is
pointless.

> + return NOTIFY_DONE;
> + }
> + if (tail_spin == NULL)

Always true condition.

> + tail_spin = token;

Pointless assign.

>
> + return bond_slave_netdev_event(event, event_dev);

This whole patch is a very complicated no-op. :P I'm not sure at all
what was intended by this patch.

> + }
> return NOTIFY_DONE;
> }

regards,
dan carpenter

\
 
 \ /
  Last update: 2020-05-07 12:01    [W:0.090 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site