Re: [PATCH 1/1] ser_gigaset: use container_of() instead of detour

From: Paul Bolle
Date: Thu Feb 18 2016 - 17:15:25 EST


On do, 2016-02-18 at 22:42 +0100, Tilman Schmidt wrote:
> Acked-by: Tilman Schmidt <tilman@xxxxxxx>
>
> Thanks for cleaning up the mess I left behind.

That's not how I look at it.

Commit 4c5e354a9742 ("ser_gigaset: fix deallocation of platform device
structure") provided a plausible fix for the issue we were trying to fix
two months ago. If the platform code hadn't been broken when you wrote
it - broken for ser_gigaset's corner case, that is - you would have
noticed the lifetime rules of driver_data the hard way. (I suspect I
might have never noticed if syzkaller hadn't insisted in rubbing my nose
in it.)

So chances are you would have come up with something similar to this fix
would commit 25cad69f21f5 ("base/platform: Fix platform drivers with no
probe callback") already have landed.

Thanks,


Paul Bolle