Skip to content

Modify execution timing of iounmap #12

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

Merged
merged 1 commit into from
Jan 31, 2019

Conversation

AtsushiSaito
Copy link
Contributor

現状、ioremap_nocacheiounmapをデバイスファイルをopenreleaseをする度に行っています。高速でデバイスファイルにアクセスすると、ioremap_nocacheが正常に実行できず、下記のエラーが出る場合があります。

[  279.801467] Unable to handle kernel NULL pointer dereference at virtual address 00000094

ioremap_nocacheiounmapを実行するタイミングを変更することで、この問題を解決するプルリクエストです。

ログ詳細

[  279.801467] Unable to handle kernel NULL pointer dereference at virtual address 00000094
[  279.801735] pgd = afd0c000
[  279.801827] [00000094] *pgd=378e2835, *pte=00000000, *ppte=00000000
[  279.802146] Internal error: Oops: 817 [#1] SMP ARM
[  279.802286] Modules linked in: evdev joydev xpad ff_memless squashfs mcp320x industrialio rtmouse(O) fuse binfmt_misc brcmfmac brcmutil cfg80211 rfkill spidev i2c_bcm2835 spi_bcm2835 cdc_acm uio_pdrv_genirq fixed uio iscsi_tcp libiscsi_tcp libiscsi ipv6
[  279.803045] CPU: 3 PID: 1560 Comm: buttons Tainted: G           O    4.14.58-v7+ #1130
[  279.803266] Hardware name: BCM2835
[  279.803369] task: b92b3c00 task.stack: afcc4000
[  279.803539] PC is at sw_read+0xa4/0x1b8 [rtmouse]
[  279.803687] LR is at _raw_spin_unlock_irqrestore+0x3c/0x70
[  279.803841] pc : [<7f4fcdb4>]    lr : [<807a2464>]    psr: 600f0013
[  279.804013] sp : afcc5e70  ip : 00000000  fp : afcc5edc
[  279.804159] r10: 00000000  r9 : afcc4000  r8 : 00001fff
[  279.804307] r7 : afcc5f80  r6 : 7f500800  r5 : 01d20288  r4 : 04000000
[  279.804486] r3 : 00000000  r2 : 00000000  r1 : 7f4ff48c  r0 : afcc5e80
[  279.804667] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
[  279.804863] Control: 10c5383d  Table: 2fd0c06a  DAC: 00000055
[  279.805023] Process buttons (pid: 1560, stack limit = 0xafcc4210)
[  279.809249] Stack: (0xafcc5e70 to 0xafcc6000)
[  279.812724] 5e60:                                     bcdcc000 00000000 00000000 afcc5f80
[  279.819218] 5e80: afcc5f5c afcc5ea8 00000001 80108204 afcc4000 8029b548 afcc5f4c afcc5ea8
[  279.826182] 5ea0: 8029b548 80294cb8 b966c310 b8af7bb0 47726a47 00000009 b651a015 802773e8
[  279.833667] 5ec0: 00000000 b928d300 afcc5f80 01d20288 afcc5f4c afcc5ee0 8028ab98 7f4fcd1c
[  279.841690] 5ee0: 00000000 afcc5ee8 ffffff9c 0000000a b9766600 802ab19c afcc5f3c 8029a788
[  279.850130] 5f00: 802ab19c 8079d4c8 802aafb0 b651a000 b928d300 b651a000 b928d308 8028ad04
[  279.859028] 5f20: 00000020 00000000 00001fff b928d300 01d20288 afcc5f80 80108204 afcc4000
[  279.868381] 5f40: afcc5f7c afcc5f50 8028ad2c 8028ab6c 802aa98c 802aa168 afcc5f7c b928d300
[  279.878496] 5f60: b928d301 00001fff 01d20288 80108204 afcc5fa4 afcc5f80 8028b2dc 8028ac9c
[  279.888970] 5f80: 00000000 00000000 7ec9be64 00001fff 01d20288 00000003 00000000 afcc5fa8
[  279.900159] 5fa0: 80108060 8028b294 7ec9be64 00001fff 0000000a 01d20288 00001fff 92200000
[  279.911850] 5fc0: 7ec9be64 00001fff 01d20288 00000003 00000000 0002c1a8 76fd1000 00000000
[  279.924024] 5fe0: 00000000 7ec9bdb8 00000000 76c69072 00000030 0000000a 00000000 00000000
[  279.936379] [<7f4fcdb4>] (sw_read [rtmouse]) from [<8028ab98>] (__vfs_read+0x38/0x130)
[  279.949026] [<8028ab98>] (__vfs_read) from [<8028ad2c>] (vfs_read+0x9c/0x168)
[  279.955352] [<8028ad2c>] (vfs_read) from [<8028b2dc>] (SyS_read+0x54/0xb0)
[  279.961200] [<8028b2dc>] (SyS_read) from [<80108060>] (ret_fast_syscall+0x0/0x28)
[  279.973156] Code: e3a0c000 e24b005c e30f148c e3471f4f (e582c094) 
[  279.978853] ---[ end trace c223771aaa329f77 ]---

@Tiryoh
Copy link
Contributor

Tiryoh commented Dec 28, 2018

PRありがとうございます。まずは手元の環境で試してみます。
参考までに試した環境(OSやRaspberry Piのバージョン)を教えていただけますか。

@Tiryoh Tiryoh added the Type: Bug Bug or Bug fixes label Dec 28, 2018
@AtsushiSaito
Copy link
Contributor Author

試したRaspberry Piは3B+です。
OSについては以下の通りです。

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.5 LTS
Release:	16.04
Codename:	xenial
$ uname -a
Linux ubuntu 4.14.58-v7+ #1130 SMP Thu Jul 26 14:30:50 BST 2018 armv7l armv7l armv7l GNU/Linux

@Tiryoh Tiryoh changed the title Modify execution timing of iounmap [WIP]Modify execution timing of iounmap Dec 29, 2018
@Tiryoh
Copy link
Contributor

Tiryoh commented Jan 31, 2019

Raspberry Pi 3 Model Bにて下記の2つの環境で問題なく動かせることを確認しました.

  • Raspbian
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Raspbian
Description:	Raspbian GNU/Linux 9.4 (stretch)
Release:	9.4
Codename:	stretch
$ uname -a
Linux raspberrypi 4.14.79-v7+ #1159 SMP Sun Nov 4 17:50:20 GMT 2018 armv7l GNU/Linux
  • Ubuntu
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.1 LTS
Release:	18.04
Codename:	bionic
$ uname -a
Linux ubuntu 4.15.0-1027-raspi2 #29-Ubuntu SMP PREEMPT Wed Oct 24 08:56:30 UTC 2018 aarch64 aarch64 aarch64 GNU/Linux

@Tiryoh
Copy link
Contributor

Tiryoh commented Jan 31, 2019

@AtsushiSaito 遅くなってしまいましたが,こちらでも動作確認ができましたので,マージします.ありがとうございます.

@Tiryoh Tiryoh changed the title [WIP]Modify execution timing of iounmap Modify execution timing of iounmap Jan 31, 2019
@Tiryoh Tiryoh merged commit 1a1e08f into rt-net:master Jan 31, 2019
@Tiryoh
Copy link
Contributor

Tiryoh commented Feb 1, 2019

追加でRaspberry Pi 3 Model Bにて下記の環境で動作確認を行いました。

$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 16.04.3 LTS
Release:	16.04
Codename:	xenial
$ uname -a
Linux ubuntu 4.4.0-1080-raspi2 #88-Ubuntu SMP Mon Dec 11 14:23:15 UTC 2017 armv7l armv7l armv7l GNU/Linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug or Bug fixes Type: Feature New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy