DingXiang
4df2bf466a
dm snapshot: disallow the COW and origin devices from being identical
Otherwise loading a "snapshot" table using the same device for the
origin and COW devices, e.g.:
echo "0 20971520 snapshot 253:3 253:3 P 8" | dmsetup create snap
will trigger:
BUG: unable to handle kernel NULL pointer dereference at 0000000000000098
[ 1958.979934] IP: [<ffffffffa040efba>] dm_exception_store_set_chunk_size+0x7a/0x110 [dm_snapshot]
[ 1958.989655] PGD 0
[ 1958.991903] Oops: 0000 [#1] SMP
...
[ 1959.059647] CPU: 9 PID: 3556 Comm: dmsetup Tainted: G IO 4.5.0-rc5.snitm+ #150
...
[ 1959.083517] task: ffff8800b9660c80 ti: ffff88032a954000 task.ti: ffff88032a954000
[ 1959.091865] RIP: 0010:[<ffffffffa040efba>] [<ffffffffa040efba>] dm_exception_store_set_chunk_size+0x7a/0x110 [dm_snapshot]
[ 1959.104295] RSP: 0018:ffff88032a957b30 EFLAGS: 00010246
[ 1959.110219] RAX: 0000000000000000 RBX: 0000000000000008 RCX: 0000000000000001
[ 1959.118180] RDX: 0000000000000000 RSI: 0000000000000008 RDI: ffff880329334a00
[ 1959.126141] RBP: ffff88032a957b50 R08: 0000000000000000 R09: 0000000000000001
[ 1959.134102] R10: 000000000000000a R11: f000000000000000 R12: ffff880330884d80
[ 1959.142061] R13: 0000000000000008 R14: ffffc90001c13088 R15: ffff880330884d80
[ 1959.150021] FS: 00007f8926ba3840(0000) GS:ffff880333440000(0000) knlGS:0000000000000000
[ 1959.159047] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1959.165456] CR2: 0000000000000098 CR3: 000000032f48b000 CR4: 00000000000006e0
[ 1959.173415] Stack:
[ 1959.175656] ffffc90001c13040 ffff880329334a00 ffff880330884ed0 ffff88032a957bdc
[ 1959.183946] ffff88032a957bb8 ffffffffa040f225 ffff880329334a30 ffff880300000000
[ 1959.192233] ffffffffa04133e0 ffff880329334b30 0000000830884d58 00000000569c58cf
[ 1959.200521] Call Trace:
[ 1959.203248] [<ffffffffa040f225>] dm_exception_store_create+0x1d5/0x240 [dm_snapshot]
[ 1959.211986] [<ffffffffa040d310>] snapshot_ctr+0x140/0x630 [dm_snapshot]
[ 1959.219469] [<ffffffffa0005c44>] ? dm_split_args+0x64/0x150 [dm_mod]
[ 1959.226656] [<ffffffffa0005ea7>] dm_table_add_target+0x177/0x440 [dm_mod]
[ 1959.234328] [<ffffffffa0009203>] table_load+0x143/0x370 [dm_mod]
[ 1959.241129] [<ffffffffa00090c0>] ? retrieve_status+0x1b0/0x1b0 [dm_mod]
[ 1959.248607] [<ffffffffa0009e35>] ctl_ioctl+0x255/0x4d0 [dm_mod]
[ 1959.255307] [<ffffffff813304e2>] ? memzero_explicit+0x12/0x20
[ 1959.261816] [<ffffffffa000a0c3>] dm_ctl_ioctl+0x13/0x20 [dm_mod]
[ 1959.268615] [<ffffffff81215eb6>] do_vfs_ioctl+0xa6/0x5c0
[ 1959.274637] [<ffffffff81120d2f>] ? __audit_syscall_entry+0xaf/0x100
[ 1959.281726] [<ffffffff81003176>] ? do_audit_syscall_entry+0x66/0x70
[ 1959.288814] [<ffffffff81216449>] SyS_ioctl+0x79/0x90
[ 1959.294450] [<ffffffff8167e4ae>] entry_SYSCALL_64_fastpath+0x12/0x71
...
[ 1959.323277] RIP [<ffffffffa040efba>] dm_exception_store_set_chunk_size+0x7a/0x110 [dm_snapshot]
[ 1959.333090] RSP <ffff88032a957b30>
[ 1959.336978] CR2: 0000000000000098
[ 1959.344121] ---[ end trace b049991ccad1169e ]---
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1195899
Cc: stable@vger.kernel.org
Signed-off-by: Ding Xiang <dingxiang@huawei.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
2016-03-10 17:12:09 -05:00
..
2015-12-13 19:59:48 -08:00
2015-12-14 10:11:09 -08:00
2016-02-04 18:26:08 +01:00
2016-01-20 18:03:56 -08:00
2016-02-04 18:25:55 +01:00
2015-12-11 16:56:16 +01:00
2016-01-13 16:00:32 +01:00
2015-11-21 18:42:00 +01:00
2015-10-20 18:10:25 +02:00
2015-12-22 17:04:56 +00:00
2015-12-29 10:08:45 +01:00
2016-01-07 10:10:50 -05:00
2016-01-18 12:10:45 -08:00
2016-01-23 18:45:06 -08:00
2016-01-23 18:45:06 -08:00
2016-01-05 18:04:58 +01:00
2016-01-07 09:55:39 -08:00
2015-12-28 18:43:15 +01:00
2015-11-16 15:41:49 +00:00
2015-12-21 14:26:28 +05:30
2015-10-27 11:24:23 +01:00
2016-01-24 12:50:56 -08:00
2015-12-05 02:06:51 +01:00
2015-12-17 22:08:28 -05:00
2016-01-21 14:47:08 -08:00
2016-01-12 18:26:10 +00:00
2016-01-20 18:42:30 -08:00
2016-01-11 16:48:35 +00:00
2015-12-16 16:36:25 +02:00
2016-01-23 18:45:06 -08:00
2016-01-13 09:26:40 -08:00
2016-01-12 01:10:19 +01:00
2015-12-23 08:37:10 -07:00
2016-01-04 16:19:57 +00:00
2016-01-14 13:40:30 +01:00
2015-11-03 17:22:17 -08:00
2016-01-17 19:13:15 -08:00
2015-11-05 14:51:32 -08:00
2016-01-09 08:39:04 -08:00
2015-12-13 15:55:55 +01:00
2016-01-24 03:47:37 +01:00
2016-01-24 03:49:03 +01:00
2015-12-03 09:32:21 -07:00
2015-12-09 10:35:16 -08:00
2015-12-22 09:38:34 -07:00
2015-10-27 15:04:56 +09:00
2015-12-01 10:53:59 -07:00
2016-02-04 21:37:52 -08:00
2015-12-06 12:46:31 +01:00
2015-11-25 12:14:09 -05:00
2015-11-25 11:35:14 -05:00
2015-11-11 02:19:33 -05:00
2015-11-18 11:20:40 +11:00
2015-12-03 10:24:08 -05:00
2016-01-22 10:42:57 -05:00
2016-01-12 19:20:32 -08:00
2016-01-27 09:10:29 -05:00
2015-12-23 13:08:56 -08:00
2015-11-25 22:28:30 +01:00
2015-10-23 17:55:10 +09:00
2015-11-05 19:34:48 -08:00
2015-11-06 17:50:42 -08:00
2016-02-15 13:06:00 -05:00
2015-12-07 00:02:05 +00:00
2016-01-20 17:20:53 -08:00
2016-01-16 11:17:25 -08:00
2015-11-24 09:56:43 +01:00
2015-12-04 10:34:45 +01:00
2016-01-01 03:49:51 +01:00
2016-01-20 17:09:18 -08:00
2016-01-22 10:22:46 -05:00
2016-01-30 13:35:32 -08:00
2015-11-16 09:27:32 +05:30
2016-01-14 16:00:49 -08:00
2015-12-30 13:01:03 -05:00
2015-11-02 13:14:44 -08:00
2016-01-13 17:30:32 +09:00
2016-03-10 17:12:09 -05:00
2016-01-08 01:12:06 +01:00
2016-02-06 23:45:46 -08:00
2016-01-20 17:09:18 -08:00
2015-10-23 17:55:10 +09:00
2016-01-20 17:09:18 -08:00
2016-01-06 15:17:47 +05:30
2016-01-15 22:08:45 +01:00
2015-11-18 16:27:46 -05:00
2016-01-04 10:58:35 +01:00
2015-11-25 09:22:00 -07:00
2015-11-25 09:22:02 -07:00
2015-12-11 16:56:40 +01:00
2016-02-10 16:25:52 +00:00
2015-12-11 11:05:57 -08:00
2016-01-16 11:17:24 -08:00
2016-01-06 16:31:56 -05:00
2015-12-15 08:53:36 -05:00
2015-12-14 18:58:42 -08:00
2015-12-15 15:41:24 +02:00
2015-10-31 16:12:10 -07:00
2015-10-30 01:47:27 -04:00
2016-01-08 21:40:34 -05:00
2016-01-30 13:35:31 -08:00
2016-02-18 16:23:24 -08:00
2016-02-18 16:34:15 -08:00
2015-11-04 18:10:13 -08:00
2015-12-22 17:10:17 -06:00
2016-01-09 22:42:31 -08:00
2016-02-05 18:10:40 -08:00
2015-11-18 16:17:42 -05:00
2015-12-05 17:41:42 -05:00
2015-12-28 13:41:50 +01:00
2015-11-09 15:11:24 -08:00
2016-01-17 11:13:55 +01:00
2016-01-21 17:20:51 -08:00
2015-11-06 17:50:42 -08:00
2016-01-15 17:56:32 -08:00
2015-12-21 13:07:56 -08:00
2015-10-20 17:47:45 +02:00
2016-01-13 11:06:03 +01:00
2015-11-25 09:22:00 -07:00
2015-10-23 05:44:28 -07:00
2015-11-20 11:31:26 -05:00
2015-12-03 11:49:26 -05:00
2015-12-15 16:50:20 -05:00
2015-12-15 23:26:51 -05:00
2015-12-04 10:34:46 +01:00
2016-02-15 12:42:38 +00:00
2015-10-27 08:36:08 +09:00
2016-01-23 18:45:06 -08:00
2016-01-20 17:09:18 -08:00
2015-11-04 11:30:57 -08:00
2016-01-29 12:34:29 +01:00
2015-12-02 23:37:16 -05:00
2015-12-11 11:52:29 -08:00
2015-12-14 10:03:46 +01:00
2016-01-26 16:00:14 +01:00
2015-10-30 10:13:26 +01:00
2015-11-23 09:44:58 +01:00
2016-01-16 11:17:23 -08:00
2016-01-16 11:17:22 -08:00
2015-11-20 15:55:52 -05:00
2016-01-20 17:09:18 -08:00
2015-10-21 15:18:36 +01:00
2015-12-15 10:01:43 -05:00
2015-12-12 10:15:34 -08:00
2015-11-28 19:33:29 -08:00
2016-01-15 17:56:32 -08:00
2015-11-25 17:24:23 +01:00
2016-01-15 17:56:32 -08:00
2016-01-04 09:57:40 +01:00
2016-01-25 15:20:44 -05:00
2016-01-09 08:39:03 -08:00
2016-02-04 09:19:45 -07:00
2015-11-23 10:37:35 -08:00
2016-01-20 17:09:18 -08:00
2015-11-23 10:37:35 -08:00
2016-01-15 17:56:32 -08:00
2015-12-03 23:01:27 +01:00
2016-02-11 18:35:48 -08:00
2015-11-25 09:22:02 -07:00
2015-12-24 11:09:40 -05:00
2016-01-20 17:09:18 -08:00
2015-11-17 15:25:43 -05:00
2015-11-10 12:06:16 +01:00
2016-01-07 14:31:27 -05:00
2016-01-15 17:56:32 -08:00
2016-02-03 08:28:43 -08:00
2016-01-15 17:56:32 -08:00
2016-01-14 16:00:49 -08:00
2016-01-15 17:56:32 -08:00
2015-10-27 18:55:31 -07:00
2016-01-14 16:00:49 -08:00
2016-02-03 08:28:43 -08:00
2016-02-03 08:28:43 -08:00
2016-01-15 17:56:32 -08:00
2016-02-03 08:28:43 -08:00
2015-12-14 19:15:05 -08:00
2016-02-03 16:58:15 +10:30
2015-11-06 17:50:42 -08:00
2015-10-20 22:10:45 +08:00
2015-11-30 15:26:22 -05:00
2016-01-21 11:52:16 -08:00
2016-01-09 03:07:52 -05:00
2015-12-01 15:45:05 -05:00
2015-12-15 16:50:20 -05:00
2016-01-24 22:19:55 -08:00
2015-11-06 19:33:12 +01:00
2015-12-15 23:25:20 -05:00
2016-01-14 16:08:23 -08:00
2015-12-28 09:57:15 -05:00
2016-01-14 16:08:23 -08:00
2016-01-04 13:19:55 -05:00
2015-11-05 19:34:48 -08:00
2015-12-01 10:59:38 -07:00
2015-12-17 10:43:06 -06:00
2015-11-16 09:03:21 +05:30
2016-01-05 11:20:12 +01:00
2015-12-09 09:23:28 -06:00
2016-01-15 12:30:35 -06:00
2016-01-25 08:35:50 -06:00
2015-12-18 11:17:26 +05:30
2015-11-05 19:34:48 -08:00
2016-01-15 17:56:32 -08:00
2015-11-06 17:50:42 -08:00
2016-01-22 17:02:18 -08:00
2016-01-15 17:29:37 -06:00
2016-01-21 11:52:16 -08:00
2015-11-16 10:40:50 -05:00
2015-11-16 10:50:25 -05:00
2016-01-29 08:35:35 +01:00
2016-02-11 18:35:48 -08:00
2016-02-11 18:35:48 -08:00
2016-01-07 14:31:27 -05:00
2015-11-30 15:26:22 -05:00
2016-01-19 19:25:21 -05:00
2016-01-12 20:25:09 -08:00
2016-01-08 01:12:06 +01:00
2015-12-10 23:08:51 +01:00
2015-12-21 03:11:12 +01:00
2016-01-08 01:12:06 +01:00
2016-01-22 17:02:18 -08:00
2016-01-16 11:17:22 -08:00
2015-12-06 21:25:17 -05:00
2016-01-02 00:29:35 +01:00
2015-10-21 14:46:56 -06:00
2016-01-16 11:17:29 -08:00
2016-01-01 02:09:51 +01:00
2015-11-23 09:44:58 +01:00
2015-10-22 08:59:18 -07:00
2015-11-03 11:08:22 -05:00
2016-01-20 17:09:18 -08:00
2015-11-10 13:06:16 +01:00
2015-10-30 11:18:05 +09:00
2016-02-05 18:10:40 -08:00
2016-01-20 17:09:18 -08:00
2015-12-07 17:02:54 -08:00
2015-12-07 17:02:54 -08:00
2015-12-07 17:01:31 -08:00
2015-12-07 17:01:31 -08:00
2016-01-05 19:07:17 +00:00
2015-11-16 09:23:47 +01:00
2015-12-17 22:08:28 -05:00
2015-11-02 14:23:38 -05:00
2016-02-05 18:10:40 -08:00
2016-01-10 22:13:15 -05:00
2015-12-15 09:41:09 +01:00
2016-01-22 10:24:03 -08:00
2015-11-19 16:22:43 +01:00
2015-10-27 19:55:13 -07:00
2015-12-24 11:09:40 -05:00
2015-12-13 19:59:48 -08:00
2015-12-17 11:18:44 +01:00
2015-11-24 11:48:35 +09:00
2016-01-04 16:11:11 -05:00
2016-01-20 17:09:18 -08:00
2016-01-22 18:08:52 -05:00
2015-11-20 16:17:32 -08:00
2016-02-09 04:28:06 -05:00
2016-01-20 17:09:18 -08:00
2016-01-20 17:09:18 -08:00
2016-01-20 17:09:18 -08:00
2015-10-20 10:23:55 +02:00
2015-12-15 23:26:51 -05:00
2016-01-06 11:02:29 +01:00
2016-01-04 10:20:19 -05:00
2015-10-26 10:11:58 +09:00
2016-01-20 17:09:18 -08:00
2016-01-20 17:29:52 -05:00
2015-12-01 14:00:53 -05:00
2015-11-13 21:53:18 -08:00
2015-10-21 14:42:38 -06:00
2015-11-05 14:36:09 -05:00
2015-12-29 16:00:00 +08:00
2016-01-14 16:00:49 -08:00
2016-01-15 22:34:39 +01:00
2015-12-10 22:41:06 -08:00
2016-01-18 14:49:33 -05:00
2015-10-25 21:33:56 -04:00
2015-11-05 19:34:48 -08:00
2015-12-06 12:56:06 +01:00
2016-02-15 13:04:46 -05:00
2016-01-26 23:17:54 -08:00
2015-11-25 15:49:13 +00:00
2015-12-17 09:57:27 -08:00
2016-02-10 13:19:03 +00:00
2015-12-18 17:48:50 -08:00
2015-12-06 20:42:15 -05:00
2015-11-23 09:44:58 +01:00
2015-12-01 14:58:18 -08:00
2015-12-21 15:28:11 -07:00
2015-11-05 11:07:36 +10:00
2015-12-04 10:38:59 -02:00
2016-01-12 20:47:06 +02:00
2016-01-12 20:47:02 +02:00
2016-01-15 17:56:32 -08:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2016-01-14 16:00:49 -08:00
2015-12-04 10:34:45 +01:00
2016-01-12 18:57:02 -08:00
2016-01-11 21:53:59 +01:00
2015-12-03 07:24:29 -08:00
2016-01-29 13:31:10 -05:00
2015-12-13 19:46:12 -05:00
2015-11-06 17:50:42 -08:00
2015-11-06 17:50:42 -08:00
2015-11-06 17:50:42 -08:00