Maurizio Lombardi
d6216c4734
[SCSI] st: fix corruption of the st_modedef structures in st_set_options()
...
When copying the st_modedef structures the devs pointers must be preserved
in the same way as with the cdevs pointers.
This fixes bug 70271: https://bugzilla.kernel.org/show_bug.cgi?id=70271
[ 135.037052] BUG: unable to handle kernel NULL pointer dereference at 0000000000000098
[ 135.045048] IP: [<ffffffff812af6a1>] kernfs_find_ns+0x21/0x150
[ 135.050999] PGD 220623067 PUD 222171067 PMD 0
[ 135.055593] Oops: 0000 [#1 ] SMP
[ 135.058938] Modules linked in: bnx2fc cnic uio fcoe libfcoe libfc 8021q mrp scsi_transport_fc garp scsi_tgt stp llc binfmt_misc dm_round_robin dm_multipath uinput iTCO_wdt iTCO_vendor_support microcode sg pcspkr serio_raw osst st(-) i2c_i801 lpc_ich mfd_core e1000e ptp pps_core ipmi_si ipmi_msghandler video tpm_infineon ext4(F) jbd2(F) mbcache(F) sd_mod(F) crc_t10dif(F) crct10dif_common(F) sr_mod(F) cdrom(F) pata_acpi(F) ata_generic(F) ata_piix(F) libata(F) mpt2sas(F) scsi_transport_sas(F) raid_class(F) ast(F) ttm(F) drm_kms_helper(F) drm(F) i2c_algo_bit(F) sysimgblt(F) sysfillrect(F) i2c_core(F) syscopyarea(F) dm_mirror(F) dm_region_hash(F) dm_log(F) dm_mod(F)
[ 135.119686] CPU: 2 PID: 2028 Comm: rmmod Tainted: GF 3.14.0-rc1-linux-mainline+ #14
[ 135.128453] Hardware name: wortmann To be filled by O.E.M./P8B-M Series, BIOS 6103 12/06/2012
[ 135.137127] task: ffff880001de29d0 ti: ffff8802206e4000 task.ti: ffff8802206e4000
[ 135.144742] RIP: 0010:[<ffffffff812af6a1>] [<ffffffff812af6a1>] kernfs_find_ns+0x21/0x150
[ 135.153148] RSP: 0018:ffff8802206e5c98 EFLAGS: 00010282
[ 135.158562] RAX: ffff880001de29d0 RBX: 0000000000000000 RCX: 0000000000000006
[ 135.165814] RDX: 0000000000000000 RSI: ffffffff817627e0 RDI: 0000000000000000
[ 135.173040] RBP: ffff8802206e5cc8 R08: 0000000000000000 R09: 0000000000000001
[ 135.180303] R10: 0000000000000000 R11: 0000000000000001 R12: ffffffff817627e0
[ 135.187554] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000001
[ 135.194774] FS: 00007f817c720700(0000) GS:ffff880227200000(0000) knlGS:0000000000000000
[ 135.202995] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 135.208878] CR2: 0000000000000098 CR3: 00000002219b0000 CR4: 00000000000407e0
[ 135.216139] Stack:
[ 135.218185] ffffffff81af63a0 0000000000000000 ffffffff817627e0 0000000000000000
[ 135.225783] 0000000000000000 0000000000000001 ffff8802206e5cf8 ffffffff812af8de
[ 135.233347] ffff880226801900 ffffffff81b43320 0000000000000000 ffff880221a7c1c0
[ 135.240972] Call Trace:
[ 135.243463] [<ffffffff812af8de>] kernfs_find_and_get_ns+0x3e/0x70
[ 135.249743] [<ffffffff812ae27d>] sysfs_unmerge_group+0x1d/0x60
[ 135.255716] [<ffffffff81464da9>] pm_qos_sysfs_remove_latency+0x19/0x20
[ 135.262430] [<ffffffff81466a91>] dev_pm_qos_constraints_destroy+0x31/0x1e0
[ 135.269500] [<ffffffff81464de6>] dpm_sysfs_remove+0x16/0x50
[ 135.275263] [<ffffffff8145c077>] device_del+0x47/0x1e0
[ 135.280554] [<ffffffff8145c232>] device_unregister+0x22/0x60
[ 135.286406] [<ffffffffa02e23bd>] remove_cdevs+0x4d/0x90 [st]
[ 135.292247] [<ffffffffa02e78ff>] st_remove+0x3f/0xb0 [st]
[ 135.297851] [<ffffffff8145f39f>] __device_release_driver+0x7f/0xf0
[ 135.304237] [<ffffffff8145f4e8>] driver_detach+0xd8/0xe0
[ 135.309722] [<ffffffff8145e0fc>] bus_remove_driver+0x5c/0xd0
[ 135.315553] [<ffffffff81460170>] driver_unregister+0x30/0x70
[ 135.321366] [<ffffffffa02e97f4>] exit_st+0x5c/0x868 [st]
[ 135.326861] [<ffffffff8111b31a>] SyS_delete_module+0x19a/0x1f0
[ 135.332891] [<ffffffff810e336d>] ? trace_hardirqs_on+0xd/0x10
[ 135.338811] [<ffffffff81141974>] ? __audit_syscall_entry+0x94/0x100
[ 135.345282] [<ffffffff8135b1fe>] ? trace_hardirqs_on_thunk+0x3a/0x3f
[ 135.351806] [<ffffffff816e8de9>] system_call_fastpath+0x16/0x1b
[ 135.357859] Code: ff eb e3 0f 1f 80 00 00 00 00 55 48 89 e5 48 83 ec 30 48 89 5d d8 4c 89 65 e0 4c 89 6d e8 4c 89 75 f0 4c 89 7d f8 66 66 66 66 90 <44> 0f b7 bf 98 00 00 00 8b 05 71 6d 87 00 48 89 fb 49 89 f4 49
[ 135.378282] RIP [<ffffffff812af6a1>] kernfs_find_ns+0x21/0x150
[ 135.384355] RSP <ffff8802206e5c98>
[ 135.387881] CR2: 0000000000000098
[ 135.391298] ---[ end trace 1968409221ddb3c8 ]---
Signed-off-by: Maurizio Lombardi <mlombard@redhat.com>
Acked-by: Kai Mäkisara <kai.makisara@kolumbus.fi>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
2014-03-15 10:19:22 -07:00
..
2014-03-15 10:19:00 -07:00
2013-09-10 14:48:16 -07:00
2013-06-04 11:15:59 -07:00
2014-03-15 10:19:19 -07:00
2013-04-09 14:13:27 -04:00
2014-03-15 10:19:18 -07:00
2014-03-15 10:19:17 -07:00
2014-03-15 10:17:47 -07:00
2014-03-15 10:19:18 -07:00
2013-11-15 16:47:22 -08:00
2014-03-15 10:19:18 -07:00
2013-10-25 11:19:33 +01:00
2011-07-26 16:49:47 -07:00
2014-03-15 10:18:58 -07:00
2013-11-14 12:25:38 +09:00
2013-11-15 16:47:22 -08:00
2013-09-06 11:41:34 -07:00
2014-03-15 10:19:17 -07:00
2013-09-04 13:52:35 -07:00
2014-03-15 10:18:53 -07:00
2014-03-15 10:18:58 -07:00
2014-03-15 10:19:21 -07:00
2014-01-30 11:19:05 -08:00
2014-01-30 11:19:05 -08:00
2013-10-14 15:26:04 +02:00
2013-11-23 22:33:47 -08:00
2013-04-09 14:13:21 -04:00
2014-03-15 10:19:01 -07:00
2014-03-15 10:18:54 -07:00
2014-03-15 10:19:18 -07:00
2013-12-21 10:06:10 -07:00
2013-11-15 16:47:22 -08:00
2013-11-29 08:48:39 +04:00
2013-11-29 08:48:39 +04:00
2013-11-29 08:48:39 +04:00
2012-03-28 18:30:03 +01:00
2013-01-03 15:57:01 -08:00
2013-11-26 11:09:07 +01:00
2013-11-26 11:09:07 +01:00
2013-11-26 11:09:07 +01:00
2013-10-25 11:44:54 +01:00
2013-04-09 14:13:22 -04:00
2012-06-28 11:44:36 +02:00
2013-04-09 14:13:23 -04:00
2013-04-09 14:13:29 -04:00
2013-04-09 14:13:29 -04:00
2013-04-09 14:13:29 -04:00
2013-10-14 15:26:04 +02:00
2013-10-25 09:57:57 +01:00
2013-06-26 18:32:47 -07:00
2013-01-03 15:57:01 -08:00
2013-02-27 19:10:18 -08:00
2013-07-09 22:52:29 +01:00
2013-11-15 16:47:22 -08:00
2013-01-03 15:57:01 -08:00
2013-10-25 11:40:42 +01:00
2013-10-25 11:36:26 +01:00
2013-04-09 14:13:17 -04:00
2013-04-09 14:13:17 -04:00
2013-09-03 07:27:58 -07:00
2013-08-01 18:08:34 -07:00
2013-08-01 18:08:34 -07:00
2013-01-03 15:57:01 -08:00
2013-06-26 18:32:47 -07:00
2013-04-09 14:13:17 -04:00
2013-04-09 14:13:16 -04:00
2013-04-09 14:13:16 -04:00
2013-11-29 08:48:39 +04:00
2013-04-09 14:13:16 -04:00
2013-11-26 11:09:07 +01:00
2014-03-15 10:18:59 -07:00
2014-03-15 10:19:08 -07:00
2014-03-15 10:19:10 -07:00
2014-03-15 10:19:09 -07:00
2013-01-03 15:57:01 -08:00
2012-11-27 08:59:43 +04:00
2013-04-09 14:13:16 -04:00
2013-04-09 14:13:25 -04:00
2013-01-03 15:57:01 -08:00
2013-12-19 07:39:04 -08:00
2013-12-19 20:56:29 -08:00
2013-11-29 08:48:39 +04:00
2013-04-09 14:13:27 -04:00
2014-03-15 10:19:19 -07:00
2014-03-15 10:19:19 -07:00
2013-01-03 15:57:01 -08:00
2014-01-22 21:21:55 -08:00
2013-01-03 15:57:01 -08:00
2014-03-15 10:19:18 -07:00
2014-03-15 10:19:18 -07:00
2011-10-31 19:31:24 -04:00
2012-03-28 18:30:03 +01:00
2013-01-03 15:57:01 -08:00
2013-12-19 20:56:28 -08:00
2013-04-09 14:13:17 -04:00
2013-12-19 07:39:02 -08:00
2013-11-29 08:48:39 +04:00
2013-04-29 15:41:57 -04:00
2012-03-28 18:30:03 +01:00
2013-01-03 15:57:01 -08:00
2013-04-09 14:13:15 -04:00
2013-10-14 15:26:04 +02:00
2013-04-15 14:30:44 -06:00
2013-10-14 15:31:06 +02:00
2013-04-09 14:13:17 -04:00
2013-04-09 14:13:17 -04:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-06-19 17:53:35 +02:00
2012-03-28 18:30:03 +01:00
2013-04-09 14:13:17 -04:00
2013-04-09 14:13:17 -04:00
2013-12-06 08:30:18 -08:00
2012-02-21 11:40:37 +01:00
2013-04-09 14:13:17 -04:00
2013-01-03 15:57:01 -08:00
2013-12-19 20:56:28 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-12-16 10:57:50 -08:00
2013-06-24 13:00:10 -07:00
2013-12-19 07:39:02 -08:00
2011-10-31 19:31:23 -04:00
2014-03-15 10:19:19 -07:00
2013-03-28 14:27:24 -04:00
2013-12-16 10:57:51 -08:00
2013-12-19 07:39:02 -08:00
2013-05-31 15:16:51 -04:00
2014-03-15 10:18:59 -07:00
2014-03-15 10:18:59 -07:00
2011-10-31 19:31:23 -04:00
2011-05-24 12:38:36 -04:00
2014-03-15 10:17:50 -07:00
2013-12-19 20:56:26 -08:00
2012-12-01 10:08:41 +00:00
2012-05-10 09:06:12 +01:00
2014-01-21 10:46:17 -08:00
2013-12-19 07:39:03 -08:00
2012-01-03 22:54:07 -05:00
2013-11-23 22:33:50 -08:00
2014-01-30 11:19:05 -08:00
2013-10-25 09:58:16 +01:00
2011-06-29 12:14:25 -05:00
2013-10-25 10:59:54 +01:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2011-10-31 19:31:24 -04:00
2013-12-16 10:57:51 -08:00
2011-07-21 14:15:58 -07:00
2014-03-15 10:19:22 -07:00
2012-09-14 17:59:29 +01:00
2013-10-14 15:26:04 +02:00
2014-03-12 13:16:54 +04:00
2013-05-04 14:50:16 -04:00
2012-03-28 18:30:03 +01:00
2013-05-04 14:50:16 -04:00
2013-05-04 14:50:16 -04:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-01-03 15:57:01 -08:00
2013-04-09 14:13:17 -04:00
2013-04-09 14:13:17 -04:00
2013-11-15 16:47:22 -08:00
2013-10-25 11:51:37 +01:00
2012-03-28 18:30:03 +01:00
2012-03-28 18:30:03 +01:00
2014-01-16 10:22:27 +10:30
2013-10-14 15:26:04 +02:00
2012-03-27 08:26:36 +01:00
2013-04-09 14:13:15 -04:00
2013-04-09 14:13:15 -04:00
2013-04-09 14:13:15 -04:00
2013-01-03 15:57:01 -08:00
2013-11-26 11:09:07 +01:00