Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mm: fix a crash when CONFIG_DEBUG_VM is enabled #231

Open
wants to merge 1 commit into
base: sunxi-3.4
Choose a base branch
from
Open

mm: fix a crash when CONFIG_DEBUG_VM is enabled #231

wants to merge 1 commit into from

Conversation

sbourdelin
Copy link

This commit fixes a crash that could happen when CONFIG_DEBUG_VM is enabled.

This commit is backported from
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=03e5ac2fc3bf6f4140db0371e8bb4243b24e3e02

This commit fixes a crash that could happen when CONFIG_DEBUG_VM is enabled.

This commit is backported from
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=03e5ac2fc3bf6f4140db0371e8bb4243b24e3e02
amery pushed a commit that referenced this pull request Jun 6, 2018
In 4.17-rc, commit 03ea6d6 ("usb: dwc2: Enable power down")
caused the HiKey board to not correctly handle switching between
usb-gadget and usb-host mode.

Unplugging the OTG port would result in:
[   42.240973] dwc2 f72c0000.usb: dwc2_restore_host_registers: no host registers to restore
[   42.249066] dwc2 f72c0000.usb: dwc2_host_exit_hibernation: failed to restore host registers

And the USB-host ports would not function.

And plugging in the OTG port, we would see:
[   46.046557] WARNING: CPU: 3 PID: 6 at drivers/usb/dwc2/gadget.c:260 dwc2_hsotg_init_fifo+0x194/0x1a0
[   46.055761] CPU: 3 PID: 6 Comm: kworker/u16:0 Not tainted 4.17.0-rc5-00030-ge67da8c #231
[   46.055767] Hardware name: HiKey Development Board (DT)
[   46.055784] Workqueue: dwc2 dwc2_conn_id_status_change
...

Thus, this patch sets the hisi params to disable the power_down
flag by default, and gets thing working again.

Cc: John Youn <johnyoun@synopsys.com>
Cc: Vardan Mikayelyan <mvardan@synopsys.com>
Cc: Artur Petrosyan <arturp@synopsys.com>
Cc: Grigor Tovmasyan <tovmasya@synopsys.com>
Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
Cc: linux-usb@vger.kernel.org
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
codekipper pushed a commit to codekipper/linux-sunxi that referenced this pull request Aug 16, 2019
WARNING: else is not generally useful after a break or return
linux-sunxi#173: FILE: mm/kmemleak.c:426:
+			return object;
+		else

WARNING: line over 80 characters
linux-sunxi#231: FILE: mm/kmemleak.c:793:
+		area = kmem_cache_alloc(scan_area_cache, gfp_kmemleak_mask(gfp));

total: 0 errors, 2 warnings, 468 lines checked

NOTE: For some of the reported defects, checkpatch may be able to
      mechanically convert to the typical style using --fix or --fix-inplace.

./patches/mm-kmemleak-use-the-memory-pool-for-early-allocations.patch has style problems, please review.

NOTE: If any of the errors are false positives, please report
      them to the maintainer, see CHECKPATCH in MAINTAINERS.

Please run checkpatch prior to sending patches

Cc: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant