Commit 662f5533 authored by Michael Büsch's avatar Michael Büsch Committed by David S. Miller

rt6_probe_deferred: Do not depend on struct ordering

rt6_probe allocates a struct __rt6_probe_work and schedules a work handler rt6_probe_deferred.
But rt6_probe_deferred kfree's the struct work_struct instead of struct __rt6_probe_work.
This works, because struct work_struct is the first element of struct __rt6_probe_work.

Change it to kfree struct __rt6_probe_work to not implicitly depend on
struct work_struct being the first element.

This does not affect the generated code.
Signed-off-by: default avatarMichael Buesch <m@bues.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent f06535c5
...@@ -499,7 +499,7 @@ static void rt6_probe_deferred(struct work_struct *w) ...@@ -499,7 +499,7 @@ static void rt6_probe_deferred(struct work_struct *w)
addrconf_addr_solict_mult(&work->target, &mcaddr); addrconf_addr_solict_mult(&work->target, &mcaddr);
ndisc_send_ns(work->dev, NULL, &work->target, &mcaddr, NULL); ndisc_send_ns(work->dev, NULL, &work->target, &mcaddr, NULL);
dev_put(work->dev); dev_put(work->dev);
kfree(w); kfree(work);
} }
static void rt6_probe(struct rt6_info *rt) static void rt6_probe(struct rt6_info *rt)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment