LKML Archive on lore.kernel.org help / color / mirror / Atom feed
From: Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> To: Minchan Kim <minchan@kernel.org> Cc: Andrew Morton <akpm@linux-foundation.org>, LKML <linux-kernel@vger.kernel.org>, Greg KH <gregkh@linuxfoundation.org>, Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com> Subject: Re: [PATCH v3 4/4] zram: introduce zram memory tracking Date: Tue, 10 Apr 2018 09:41:09 +0900 [thread overview] Message-ID: <20180410004109.GA1580@jagdpanzerIV> (raw) In-Reply-To: <20180410000305.GA6942@jagdpanzerIV> I think zram_debugfs_unregister() is called both from zram_remove() and from destroy_devices(), which explodes: [ 1906.467981] BUG: unable to handle kernel NULL pointer dereference at 00000000000000b8 [ 1906.468007] PGD 80000003d5050067 P4D 80000003d5050067 PUD 3fa97d067 PMD 0 [ 1906.468029] Oops: 0002 [#1] PREEMPT SMP PTI [ 1906.468035] Modules linked in: zram(-) zsmalloc mousedev hid_generic rndis_host usbhid cdc_ether usbnet hid snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_codec snd_hda_core coretemp snd_pcm hwmon snd_timer snd r8169 i2c_i801 soundcore mii xhci_pci xhci_hcd usbcore sd_mod usb_common [ 1906.468069] RIP: 0010:down_write+0x29/0x46 [ 1906.468073] RSP: 0018:ffffb9dd0480fdd0 EFLAGS: 00010246 [ 1906.468077] RAX: 00000000000000b8 RBX: 00000000000000b8 RCX: 0000000000000001 [ 1906.468082] RDX: ffffffff00000001 RSI: 0000000000000045 RDI: ffffffffb1baa40a [ 1906.468086] RBP: ffffa189fce9fbd8 R08: ffffb9dd0480fddc R09: 0000000000000007 [ 1906.468091] R10: ffffb9dd0480fe40 R11: 0000000000000000 R12: ffffa189fce9fbd8 [ 1906.468095] R13: ffffffffb23cab54 R14: 0000000000000000 R15: 0000000000000000 [ 1906.468100] FS: 00007fbc72cd2b80(0000) GS:ffffa18a1ed00000(0000) knlGS:0000000000000000 [ 1906.468105] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 [ 1906.468110] CR2: 00000000000000b8 CR3: 00000003b4570003 CR4: 00000000001606e0 [ 1906.468114] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 [ 1906.468119] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 [ 1906.468123] Call Trace: [ 1906.468130] debugfs_remove_recursive+0x40/0x15e [ 1906.468136] zram_remove+0x7f/0xf6 [zram] [ 1906.468141] ? hot_remove_store+0x93/0x93 [zram] [ 1906.468146] zram_remove_cb+0xd/0x10 [zram] [ 1906.468150] idr_for_each+0x50/0xc7 [ 1906.468155] destroy_devices+0x32/0x5c [zram] [ 1906.468160] SyS_delete_module+0xfd/0x19a [ 1906.468165] do_syscall_64+0x17e/0x195 [ 1906.468169] entry_SYSCALL_64_after_hwframe+0x3d/0xa2 [ 1906.468174] RIP: 0033:0x7fbc723cb5d7 [ 1906.468177] RSP: 002b:00007ffc40316d48 EFLAGS: 00000206 ORIG_RAX: 00000000000000b0 [ 1906.468182] RAX: ffffffffffffffda RBX: 0000000000000000 RCX: 00007fbc723cb5d7 [ 1906.468187] RDX: 000000000000000a RSI: 0000000000000800 RDI: 00000000013e7778 [ 1906.468191] RBP: 00000000013e7710 R08: 00007ffc40315cc1 R09: 0000000000000000 [ 1906.468196] R10: 00000000000008b2 R11: 0000000000000206 R12: 00007ffc403188b4 [ 1906.468201] R13: 0000000000000000 R14: 00000000013e7710 R15: 00000000013e7260 [ 1906.468761] Code: ff ff 0f 1f 44 00 00 53 31 d2 48 89 fb be 45 00 00 00 48 c7 c7 0a a4 ba b1 e8 ef bf b9 ff 48 89 d8 48 ba 01 00 00 00 ff ff ff ff <f0> 48 0f c1 10 85 d2 74 05 e8 9e bd ff ff 65 48 8b 04 25 80 4d [ 1906.469296] RIP: down_write+0x29/0x46 RSP: ffffb9dd0480fdd0 [ 1906.469995] CR2: 00000000000000b8 [ 1906.475689] ---[ end trace 10d42324537dfb4c ]--- -ss
next prev parent reply other threads:[~2018-04-10 0:41 UTC|newest] Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-04-09 5:54 [PATCH v3 0/4] zram memory tracking Minchan Kim 2018-04-09 5:54 ` [PATCH v3 1/4] zram: correct flag name of ZRAM_ACCESS Minchan Kim 2018-04-09 5:54 ` [PATCH v3 2/4] zram: mark incompressible page as ZRAM_HUGE Minchan Kim 2018-04-09 5:54 ` [PATCH v3 3/4] zram: record accessed second Minchan Kim 2018-04-09 5:54 ` [PATCH v3 4/4] zram: introduce zram memory tracking Minchan Kim 2018-04-09 8:03 ` Greg KH 2018-04-09 22:39 ` Minchan Kim 2018-04-10 0:03 ` Sergey Senozhatsky 2018-04-10 0:41 ` Sergey Senozhatsky [this message] 2018-04-10 6:22 ` Minchan Kim 2018-04-10 6:22 ` Minchan Kim
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=20180410004109.GA1580@jagdpanzerIV \ --to=sergey.senozhatsky.work@gmail.com \ --cc=akpm@linux-foundation.org \ --cc=gregkh@linuxfoundation.org \ --cc=linux-kernel@vger.kernel.org \ --cc=minchan@kernel.org \ /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: linkBe 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).