Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1273720 > unrolled thread
| Started by | Dave Jones <davej@codemonkey.org.uk> |
|---|---|
| First post | 2015-11-20 05:20 +0100 |
| Last post | 2015-11-20 21:50 +0100 |
| Articles | 2 — 2 participants |
Back to article view | Back to linux.kernel
pids_free double free. Dave Jones <davej@codemonkey.org.uk> - 2015-11-20 05:20 +0100
Re: pids_free double free. Tejun Heo <tj@kernel.org> - 2015-11-20 21:50 +0100
| From | Dave Jones <davej@codemonkey.org.uk> |
|---|---|
| Date | 2015-11-20 05:20 +0100 |
| Subject | pids_free double free. |
| Message-ID | <qwLl0-2dC-11@gated-at.bofh.it> |
One of my debian boxes got a systemd update. After rebooting,
I started seeing a use-after-free trace, followed by a lockup.
I have two slightly different traces from separate boots,
which may give some clue as to how it's getting free'd in two ways..
http://codemonkey.org.uk/junk/IMG_0474.jpg
http://codemonkey.org.uk/junk/IMG_0476.jpg
This isn't new, I booted back to 4.3, and hit slab debugging warnings
from the same code. (At the least it was broken differently)
The WARN_ON referenced in the 2nd trace is this..
static void pids_cancel(struct pids_cgroup *pids, int num)
{
/*
* A negative count (or overflow for that matter) is invalid,
* and indicates a bug in the `pids` controller proper.
*/
WARN_ON_ONCE(atomic64_add_negative(-num, &pids->counter));
}
Dave
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Date | 2015-11-20 21:50 +0100 |
| Message-ID | <qx0N3-3MB-1@gated-at.bofh.it> |
| In reply to | #1273720 |
Hello, Dave.
On Thu, Nov 19, 2015 at 11:18:36PM -0500, Dave Jones wrote:
> One of my debian boxes got a systemd update. After rebooting,
> I started seeing a use-after-free trace, followed by a lockup.
>
> I have two slightly different traces from separate boots,
> which may give some clue as to how it's getting free'd in two ways..
>
> http://codemonkey.org.uk/junk/IMG_0474.jpg
> http://codemonkey.org.uk/junk/IMG_0476.jpg
>
> This isn't new, I booted back to 4.3, and hit slab debugging warnings
> from the same code. (At the least it was broken differently)
>
> The WARN_ON referenced in the 2nd trace is this..
>
> static void pids_cancel(struct pids_cgroup *pids, int num)
> {
> /*
> * A negative count (or overflow for that matter) is invalid,
> * and indicates a bug in the `pids` controller proper.
> */
> WARN_ON_ONCE(atomic64_add_negative(-num, &pids->counter));
> }
I *think* I know what's going on. Zombies don't pin the css so if the
cgroup gets removed, the free path may end up operating on a css which
has already been freed. Will look more into it.
Thanks.
--
tejun
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web