From: Dan Carpenter <dan.carpenter@oracle.com>
To: Hillf Danton <hdanton@sina.com>
Cc: syzbot <syzbot+e73ceacfd8560cc8a3ca@syzkaller.appspotmail.com>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
syzkaller-bugs@googlegroups.com
Subject: Re: BUG: stack guard page was hit in unwind_next_frame
Date: Thu, 7 May 2020 12:59:49 +0300 [thread overview]
Message-ID: <20200507095949.GD9365@kadam> (raw)
In-Reply-To: <20200503102220.3848-1-hdanton@sina.com>
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
prev parent reply other threads:[~2020-05-07 10:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-03 6:36 BUG: stack guard page was hit in unwind_next_frame syzbot
2020-05-04 19:03 ` Josh Poimboeuf
2020-05-05 1:06 ` Cong Wang
2020-05-05 7:02 ` Cong Wang
[not found] ` <20200503102220.3848-1-hdanton@sina.com>
2020-05-07 9:59 ` Dan Carpenter [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=20200507095949.GD9365@kadam \
--to=dan.carpenter@oracle.com \
--cc=hdanton@sina.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=syzbot+e73ceacfd8560cc8a3ca@syzkaller.appspotmail.com \
--cc=syzkaller-bugs@googlegroups.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;
as well as URLs for NNTP newsgroup(s).