linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* unused swap offset / bad page map.
@ 2013-08-07  5:51 Dave Jones
  2013-08-07 10:04 ` Hillf Danton
  0 siblings, 1 reply; 33+ messages in thread
From: Dave Jones @ 2013-08-07  5:51 UTC (permalink / raw)
  To: linux-mm; +Cc: Linux Kernel

Seen while fuzzing with lots of child processes.

swap_free: Unused swap offset entry 001263f5
BUG: Bad page map in process trinity-child29  pte:24c7ea00 pmd:09fec067
addr:00007f9db958d000 vm_flags:00100073 anon_vma:ffff88022c004ba0 mapping:          (null) index:f99
Modules linked in: fuse ipt_ULOG snd_seq_dummy tun sctp scsi_transport_iscsi can_raw can_bcm rfcomm bnep nfnetlink hidp appletalk bluetooth rose can af_802154 phonet x25 af_rxrpc llc2 nfc rfkill af_key pppoe rds pppox ppp_generic slhc caif_socket caif irda crc_ccitt atm netrom ax25 ipx p8023 psnap p8022 llc snd_hda_codec_realtek pcspkr usb_debug snd_seq snd_seq_device snd_hda_intel snd_hda_codec snd_hwdep e1000e snd_pcm ptp pps_core snd_page_alloc snd_timer snd soundcore xfs libcrc32c
CPU: 1 PID: 2624 Comm: trinity-child29 Not tainted 3.11.0-rc4+ #1
 0000000000000000 ffff8801fd7ddc90 ffffffff81700f2c 00007f9db958d000
 ffff8801fd7ddcd8 ffffffff8117cba7 0000000024c7ea00 0000000000000f99
 00007f9db9600000 ffff880009fecc68 0000000024c7ea00 ffff8801fd7dde00
Call Trace:
 [<ffffffff81700f2c>] dump_stack+0x4e/0x82
 [<ffffffff8117cba7>] print_bad_pte+0x187/0x220
 [<ffffffff8117e415>] unmap_single_vma+0x535/0x890
 [<ffffffff8117f719>] unmap_vmas+0x49/0x90
 [<ffffffff81187ef1>] exit_mmap+0xc1/0x170
 [<ffffffff810510ef>] mmput+0x6f/0x100
 [<ffffffff81055818>] do_exit+0x288/0xcd0
 [<ffffffff810c1da5>] ? trace_hardirqs_on_caller+0x115/0x1e0
 [<ffffffff810c1e7d>] ? trace_hardirqs_on+0xd/0x10
 [<ffffffff810575dc>] do_group_exit+0x4c/0xc0
 [<ffffffff81057664>] SyS_exit_group+0x14/0x20
 [<ffffffff81713dd4>] tracesys+0xdd/0xe2

There were a slew of these. same trace, different addr/anon_vma/index.
mapping always null.

	Dave

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>

^ permalink raw reply	[flat|nested] 33+ messages in thread
* Re: unused swap offset / bad page map.
@ 2013-08-23  9:08 Hillf Danton
  0 siblings, 0 replies; 33+ messages in thread
From: Hillf Danton @ 2013-08-23  9:08 UTC (permalink / raw)
  To: Dave Jones, Hillf Danton, LKML, Linux-MM

[-- Attachment #1: Type: text/plain, Size: 782 bytes --]

On Fri, Aug 23, 2013 at 11:53 AM, Dave Jones <davej@redhat.com> wrote:
>
> On Fri, Aug 23, 2013 at 11:27:29AM +0800, Hillf Danton wrote:
>  > On Fri, Aug 23, 2013 at 11:21 AM, Dave Jones <davej@redhat.com> wrote:
>  > >
>  > > I still see the swap_free messages with this applied.
>  > >
>  > Decremented?
>
> It actually seems worse, seems I can trigger it even easier now, as if
> there's a leak.
>
If leak, add missing swap_free() for another case of reused page.


--- a/mm/memory.c Wed Aug  7 16:29:34 2013
+++ b/mm/memory.c Fri Aug 23 16:46:06 2013
@@ -2655,6 +2655,7 @@ static int do_wp_page(struct mm_struct *
  */
  page_move_anon_rmap(old_page, vma, address);
  unlock_page(old_page);
+ swap_free(pte_to_swp_entry(orig_pte));
  goto reuse;
  }
  unlock_page(old_page);
--

[-- Attachment #2: Type: text/html, Size: 1588 bytes --]

^ permalink raw reply	[flat|nested] 33+ messages in thread

end of thread, other threads:[~2013-08-27 16:32 UTC | newest]

Thread overview: 33+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-07  5:51 unused swap offset / bad page map Dave Jones
2013-08-07 10:04 ` Hillf Danton
2013-08-07 15:30   ` Dave Jones
2013-08-08 15:20     ` Hillf Danton
2013-08-08 15:36       ` Dave Jones
2013-08-19 23:18       ` Dave Jones
2013-08-20  4:39         ` Hillf Danton
2013-08-21 20:49           ` Dave Jones
2013-08-22  0:35             ` Hillf Danton
2013-08-22  3:21             ` Hillf Danton
2013-08-23  3:21               ` Dave Jones
2013-08-23  3:27                 ` Hillf Danton
2013-08-23  3:53                   ` Dave Jones
2013-08-26  3:45                     ` Hillf Danton
2013-08-26 19:08                       ` Dave Jones
2013-08-26 20:15                         ` Linus Torvalds
2013-08-26 20:46                           ` Linus Torvalds
2013-08-26 22:08                             ` Hugh Dickins
2013-08-26 22:28                               ` Dave Jones
2013-08-27  8:37                                 ` Cyrill Gorcunov
2013-08-27 16:24                                   ` Dave Jones
2013-08-27 16:32                                     ` Cyrill Gorcunov
2013-08-26 23:15                               ` Linus Torvalds
2013-08-27  5:44                                 ` Cyrill Gorcunov
2013-08-26 20:18                         ` Cyrill Gorcunov
2013-08-26 20:37                           ` Dave Jones
2013-08-26 20:42                             ` Cyrill Gorcunov
2013-08-26 21:37                               ` Cyrill Gorcunov
2013-08-26 21:42                                 ` Dave Jones
2013-08-26 21:49                                   ` Cyrill Gorcunov
2013-08-26 21:59                                     ` Dave Jones
2013-08-07 15:54   ` Dave Jones
  -- strict thread matches above, loose matches on Subject: below --
2013-08-23  9:08 Hillf Danton

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).