LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 07-13-2018, 06:21 AM   #1
dr.SysMan
LQ Newbie
 
Registered: Dec 2017
Location: Sain-Petersburg
Distribution: Ubuntu
Posts: 9

Rep: Reputation: Disabled
Calling freeze_bdev() cause a kernel bug


Hello!

Need a help to resolve next situation: during "exit" procedure in the kernel module is executing a piece of code:

Code:
...
printk(KERN_NOTICE __MODULE__ ": Freeze I/O on '%s' (@%p)\n", dudrv_bckends, backend_bdev);

if ( IS_ERR(sb = freeze_bdev(backend_bdev)) )
        {
        status = PTR_ERR(sb);
        printk(KERN_ERR __MODULE__ ": freeze_bdev(%s) -> %d", dudrv_bckends, status);
        sb = NULL;
        }
...



The dmesg show us a trace as follows:

Code:
[ 4366.087002] DUDRIVER: Freeze I/O on '/dev/sda' (@ffff880035500000)
[ 4366.088246] BUG: unable to handle kernel NULL pointer dereference at 0000000000000070
[ 4366.089399] IP: [<ffffffff810cd4e3>] up_read+0x13/0x30
[ 4366.092139] PGD 0 
[ 4366.094160] Oops: 0002 [#1] SMP 
[ 4366.101024] Modules linked in: vboxsf(OE) crct10dif_pclmul crc32_pclmul ghash_clmulni_intel aesni_intel aes_x86_64 vboxvideo(OE) lrw gf128mul glue_helper ttm drm_kms_helper ablk_helper drm input_leds joydev cryptd i2c_piix4 8250_fintek fb_sys_fops syscopyarea sysfillrect sysimgblt serio_raw mac_hid vboxguest(OE) autofs4 dudriver(OE-) vmw_pvscsi vmxnet3 hid_generic usbhid hid video psmouse ahci e1000 libahci pata_acpi
[ 4366.124022] CPU: 2 PID: 1267 Comm: rmmod Tainted: G           OE   4.4.0-127-generic #153-Ubuntu
[ 4366.135713] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
[ 4366.143461] task: ffff8800d5c5e200 ti: ffff8800a6850000 task.ti: ffff8800a6850000
[ 4366.152714] RIP: 0010:[<ffffffff810cd4e3>]  [<ffffffff810cd4e3>] up_read+0x13/0x30
[ 4366.153813] RSP: 0018:ffff8800a6853e80  EFLAGS: 00010246
[ 4366.154706] RAX: 0000000000000070 RBX: 0000000000000000 RCX: 0000000000000006
[ 4366.155732] RDX: ffffffffffffffff RSI: 0000000000000246 RDI: 0000000000000070
[ 4366.156753] RBP: ffff8800a6853e80 R08: 0000000000000000 R09: 000000000000063b
[ 4366.157778] R10: ffff88011a587490 R11: 000000000000063b R12: ffff880035500000
[ 4366.158790] R13: ffff8800355000d0 R14: 0000000000000000 R15: 0000559fc92d51f0
[ 4366.159833] FS:  00007f58f8fe9700(0000) GS:ffff88011fd00000(0000) knlGS:0000000000000000
[ 4366.160972] CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 4366.161877] CR2: 0000000000000070 CR3: 00000000a7286000 CR4: 0000000000060670
[ 4366.162946] Stack:
[ 4366.163522]  ffff8800a6853e98 ffffffff81216b66 0000000000000000 ffff8800a6853ec8
[ 4366.164700]  ffffffff8124fbed ffffffffc00d2500 00007ffe9f86b110 00007ffe9f86c87d
[ 4366.165895]  0000000000000000 ffff8800a6853ee8 ffffffffc00ce95b ffffffff8110914f
[ 4366.167065] Call Trace:
[ 4366.167724]  [<ffffffff81216b66>] drop_super+0x16/0x30
[ 4366.168626]  [<ffffffff8124fbed>] freeze_bdev+0x4d/0xf0
[ 4366.169545]  [<ffffffffc00ce95b>] dua_exit+0x81/0x726 [dudriver]
[ 4366.170588]  [<ffffffff8110914f>] ? find_module+0x1f/0x30
[ 4366.171562]  [<ffffffff8110bae8>] SyS_delete_module+0x1b8/0x210
[ 4366.172571]  [<ffffffff81850c88>] entry_SYSCALL_64_fastpath+0x1c/0xbb
[ 4366.173626] Code: 25 00 fc 00 00 48 89 57 20 5d c3 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 55 48 c7 c2 ff ff ff ff 48 89 f8 48 89 e5 <f0> 48 0f c1 10 79 05 e8 01 15 34 00 5d c3 0f 1f 44 00 00 66 2e 
[ 4366.177788] RIP  [<ffffffff810cd4e3>] up_read+0x13/0x30
[ 4366.178756]  RSP <ffff8800a6853e80>
[ 4366.179535] CR2: 0000000000000070
[ 4366.180345] ---[ end trace 85d82da9277a6cc4 ]---

This is under ubuntu 16/x64, 4.4.0-127-generic.

So is there what I'm, need to check before calling freeze_bdev()?
 
Old 07-13-2018, 09:32 AM   #2
smallpond
Senior Member
 
Registered: Feb 2011
Location: Massachusetts, USA
Distribution: CentOS 6 & 7
Posts: 2,968

Rep: Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794Reputation: 794
/dev/sda does not sound like the right device to be calling freeze_bdev on. Usually, filesystems are on a partition such as /dev/sda1 or on a logical volume rather than the raw disk.
 
1 members found this post helpful.
Old 07-13-2018, 04:30 PM   #3
dr.SysMan
LQ Newbie
 
Registered: Dec 2017
Location: Sain-Petersburg
Distribution: Ubuntu
Posts: 9

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by smallpond View Post
/dev/sda does not sound like the right device to be calling freeze_bdev on. Usually, filesystems are on a partition such as /dev/sda1 or on a logical volume rather than the raw disk.
Hmmm ... So what I'm need to do to "frezze" I/O at short time on the volume?
 
  


Reply

Tags
drivers, ubuntu 16.04


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
vfork - suspends the calling process or the calling thread? zmau Linux - Software 3 04-21-2015 02:38 PM
LVM2 freeze_bdev() trusted in FS consistency for Snapshots? dman777 Linux - Server 0 07-05-2013 07:45 PM
calling function in kernel vishalbutte Programming 0 02-14-2006 07:34 AM
Network interface: kernel keeps calling it 'eth0' monkeyman2000 Debian 12 10-20-2004 06:10 PM
Bug in c code calling bash code Linh Programming 11 08-12-2003 04:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 09:43 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration