mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Xulin Sun <xulin.sun@windriver.com>
Cc: alexandre.belloni@bootlin.com, UNGLinuxDriver@microchip.com,
	davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, xulinsun@gmail.com
Subject: Re: [PATCH] net: mscc: ocelot: replace readx_poll_timeout with readx_poll_timeout_atomic
Date: Fri, 15 May 2020 15:26:45 +0200	[thread overview]
Message-ID: <20200515132645.GR527401@lunn.ch> (raw)
In-Reply-To: <20200515031813.30283-1-xulin.sun@windriver.com>

On Fri, May 15, 2020 at 11:18:13AM +0800, Xulin Sun wrote:
> This fixes call trace like below to use atomic safe API:
> 
> BUG: sleeping function called from invalid context at drivers/net/ethernet/mscc/ocelot.c:59
> in_atomic(): 1, irqs_disabled(): 0, pid: 3778, name: ifconfig
> INFO: lockdep is turned off.
> Preemption disabled at:
> [<ffff2b163c83b78c>] dev_set_rx_mode+0x24/0x40
> Hardware name: LS1028A RDB Board (DT)
> Call trace:
> dump_backtrace+0x0/0x140
> show_stack+0x24/0x30
> dump_stack+0xc4/0x10c
> ___might_sleep+0x194/0x230
> __might_sleep+0x58/0x90
> ocelot_mact_forget+0x74/0xf8
> ocelot_mc_unsync+0x2c/0x38
> __hw_addr_sync_dev+0x6c/0x130
> ocelot_set_rx_mode+0x8c/0xa0
> __dev_set_rx_mode+0x58/0xa0
> dev_set_rx_mode+0x2c/0x40
> __dev_open+0x120/0x190
> __dev_change_flags+0x168/0x1c0
> dev_change_flags+0x3c/0x78
> devinet_ioctl+0x6c4/0x7c8
> inet_ioctl+0x2b8/0x2f8
> sock_do_ioctl+0x54/0x260
> sock_ioctl+0x21c/0x4d0
> do_vfs_ioctl+0x6d4/0x968
> ksys_ioctl+0x84/0xb8
> __arm64_sys_ioctl+0x28/0x38
> el0_svc_common.constprop.0+0x78/0x190
> el0_svc_handler+0x70/0x90
> el0_svc+0x8/0xc
> 
> Signed-off-by: Xulin Sun <xulin.sun@windriver.com>

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

  reply	other threads:[~2020-05-15 13:27 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-15  3:18 Xulin Sun
2020-05-15 13:26 ` Andrew Lunn [this message]
2020-05-15 16:30 ` Vladimir Oltean
2020-05-16 20:53 ` David Miller
2020-05-16 22:51   ` Vladimir Oltean

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=20200515132645.GR527401@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=davem@davemloft.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=xulin.sun@windriver.com \
    --cc=xulinsun@gmail.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

Powered by JetHome