Dan Williams
65d3440e8d
mm/memory-failure: fix detection of memory_failure() handlers
...
Some pagemap types, like MEMORY_DEVICE_GENERIC (device-dax) do not even
have pagemap ops which results in crash signatures like this:
BUG: kernel NULL pointer dereference, address: 0000000000000010
#PF: supervisor read access in kernel mode
#PF: error_code(0x0000) - not-present page
PGD 8000000205073067 P4D 8000000205073067 PUD 2062b3067 PMD 0
Oops: 0000 [#1 ] PREEMPT SMP PTI
CPU: 22 PID: 4535 Comm: device-dax Tainted: G OE N 6.0.0-rc2+ #59
Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS 0.0.0 02/06/2015
RIP: 0010:memory_failure+0x667/0xba0
[..]
Call Trace:
<TASK>
? _printk+0x58/0x73
do_madvise.part.0.cold+0xaf/0xc5
Check for ops before checking if the ops have a memory_failure()
handler.
Link: https://lkml.kernel.org/r/166153428781.2758201.1990616683438224741.stgit@dwillia2-xfh.jf.intel.com
Fixes: 33a8f7f2b3a3 ("pagemap,pmem: introduce ->memory_failure()")
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Acked-by: Naoya Horiguchi <naoya.horiguchi@nec.com>
Reviewed-by: Miaohe Lin <linmiaohe@huawei.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Cc: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Cc: Darrick J. Wong <djwong@kernel.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Goldwyn Rodrigues <rgoldwyn@suse.de>
Cc: Jane Chu <jane.chu@oracle.com>
Cc: Matthew Wilcox <willy@infradead.org>
Cc: Ritesh Harjani <riteshh@linux.ibm.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2022-09-11 16:22:29 -07:00
..
2022-08-28 14:02:45 -07:00
2022-08-05 16:32:45 -07:00
2022-08-05 16:32:45 -07:00
2022-08-28 14:02:43 -07:00
2022-08-02 12:34:03 -04:00
2022-08-28 14:02:45 -07:00
2022-07-29 18:07:16 -07:00
2022-05-13 15:11:26 -07:00
2022-03-22 15:57:09 -07:00
2022-08-05 16:32:45 -07:00
2022-06-27 12:52:53 -07:00
2022-03-24 19:06:45 -07:00
2022-01-15 16:30:28 +02:00
2022-03-22 15:57:11 -07:00
2022-04-26 13:36:25 -07:00
2022-05-19 14:08:55 -07:00
2022-08-05 16:32:45 -07:00
2022-08-02 12:34:04 -04:00
2022-06-27 12:52:53 -07:00
2022-07-17 17:14:27 -07:00
2022-08-20 15:17:44 -07:00
2022-08-05 16:32:45 -07:00
2022-07-29 11:33:37 -07:00
2022-08-20 15:17:44 -07:00
2022-07-29 18:07:17 -07:00
2022-08-08 18:06:43 -07:00
2022-08-08 18:06:43 -07:00
2022-08-28 14:02:43 -07:00
2022-06-16 19:11:32 -07:00
2022-02-14 19:51:47 +01:00
2022-08-05 16:32:45 -07:00
2022-06-27 12:22:31 +01:00
2022-08-10 11:07:26 -07:00
2022-05-27 11:40:49 -07:00
2022-07-17 17:14:33 -07:00
2022-06-16 19:48:32 -07:00
2022-08-05 16:32:45 -07:00
2022-06-16 19:48:31 -07:00
2022-03-23 18:03:08 -07:00
2022-07-17 17:14:28 -07:00
2022-07-03 18:08:40 -07:00
2022-01-15 16:30:27 +02:00
2022-08-09 09:48:30 -07:00
2022-07-29 18:07:18 -07:00
2022-03-05 11:08:32 -08:00
2022-07-29 18:07:20 -07:00
2022-09-11 16:22:29 -07:00
2022-08-05 16:32:45 -07:00
2022-07-29 18:07:16 -07:00
2022-06-16 19:48:30 -07:00
2022-08-05 16:32:45 -07:00
2022-08-05 16:32:45 -07:00
2022-08-05 16:32:45 -07:00
2022-05-13 07:20:09 -07:00
2022-07-17 17:14:28 -07:00
2021-07-23 17:43:28 -07:00
2022-08-20 15:17:45 -07:00
2022-04-28 23:16:12 -07:00
2022-04-21 20:01:10 -07:00
2022-03-22 17:03:12 -07:00
2022-08-28 14:02:46 -07:00
2022-05-26 12:32:41 -07:00
2022-07-17 17:14:37 -07:00
2022-06-01 15:57:16 -07:00
2022-09-11 16:22:29 -07:00
2022-01-15 16:30:27 +02:00
2022-04-29 14:36:58 -07:00
2022-05-19 14:08:54 -07:00
2022-05-26 12:32:41 -07:00
2022-06-16 19:11:30 -07:00
2022-05-26 12:32:41 -07:00
2021-06-29 10:53:47 -07:00
2021-06-29 10:53:47 -07:00
2022-05-27 11:29:35 -07:00
2022-07-17 17:14:47 -07:00
2022-08-28 14:02:43 -07:00
2021-06-29 10:53:49 -07:00
2022-05-13 07:20:18 -07:00
2021-07-04 18:30:17 +00:00
2022-03-08 09:30:46 -05:00
2021-07-04 18:30:17 +00:00
2022-07-17 17:14:47 -07:00
2022-05-13 07:20:05 -07:00
2022-03-22 15:57:08 -07:00
2022-06-23 12:22:00 -04:00
2022-08-05 16:32:45 -07:00
2022-08-03 10:35:43 -07:00
2022-08-28 14:02:43 -07:00
2022-07-29 18:07:13 -07:00
2021-05-22 15:09:07 -10:00
2022-07-20 13:30:12 +02:00
2022-08-05 16:32:45 -07:00
2022-07-20 13:30:12 +02:00
2022-07-20 13:30:12 +02:00
2022-07-20 13:30:11 +02:00
2022-08-08 18:06:42 -07:00
2022-07-03 18:08:49 -07:00
2022-03-08 09:30:46 -05:00
2022-07-20 10:52:40 +01:00
2022-08-05 16:32:45 -07:00
2022-08-05 16:32:45 -07:00
2022-07-03 18:08:52 -07:00
2022-07-03 18:08:48 -07:00
2022-06-29 08:51:05 -04:00
2022-07-01 17:03:38 -07:00
2022-08-20 15:17:45 -07:00
2022-08-05 16:32:45 -07:00
2022-07-03 18:08:41 -07:00
2021-11-06 13:30:40 -07:00
2022-08-05 16:32:45 -07:00
2022-08-20 15:17:45 -07:00
2022-07-03 18:08:40 -07:00
2022-08-02 12:34:03 -04:00
2021-07-01 11:06:03 -07:00
2022-01-15 16:30:31 +02:00
2022-08-28 14:02:44 -07:00
2022-05-19 14:08:53 -07:00