mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH RESEND 0/4] platform: fix accidently erasing .owner
@ 2014-10-28 16:40 Wolfram Sang
  2014-10-28 16:40 ` [PATCH RESEND 1/4] core: platform: add warning if driver has no owner Wolfram Sang
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Wolfram Sang @ 2014-10-28 16:40 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-kernel, Julia Lawall, Wolfram Sang

Since platform_register_driver() was converted to set the .owner of a driver,
there was a codepath on which the owner would have been erased. This series
fixes that and adds a warning to prevent such cases go unnoticed in the future.
For consistency, a semantic patch is also added which reports when .owner gets
unnecissarily set. More details in the patch descriptions. Thanks go to Russell
King for pointing out this problem and to Julia Lawall for help with the
semantic patch.

All these patches have been tested on a custom board.

This resend was rebased to rc2. It produced identical patches. IMO this should
go into v3.18 since it is a bugfix.

Please apply. The cleanup series for removing .owner in the kernel tree will
be resend later, too, as a seperate pull request.

Wolfram Sang (4):
  core: platform: add warning if driver has no owner
  core: platform: let platform_driver_probe initialize module owner
  core: platform: let platform_create_bundle initialize module owner
  coccinelle: api: add spatch to prevent unnecessary .owner

 drivers/base/driver.c                              |   3 +
 drivers/base/platform.c                            |  22 +++--
 include/linux/platform_device.h                    |  12 ++-
 scripts/coccinelle/api/platform_no_drv_owner.cocci | 106 +++++++++++++++++++++
 4 files changed, 129 insertions(+), 14 deletions(-)
 create mode 100644 scripts/coccinelle/api/platform_no_drv_owner.cocci

-- 
2.0.0


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

end of thread, other threads:[~2014-11-11  5:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-28 16:40 [PATCH RESEND 0/4] platform: fix accidently erasing .owner Wolfram Sang
2014-10-28 16:40 ` [PATCH RESEND 1/4] core: platform: add warning if driver has no owner Wolfram Sang
2014-11-10 21:32   ` Tony Luck
2014-11-11  5:30     ` Greg KH
2014-10-28 16:40 ` [PATCH RESEND 2/4] core: platform: let platform_driver_probe initialize module owner Wolfram Sang
2014-10-28 16:40 ` [PATCH RESEND 3/4] core: platform: let platform_create_bundle " Wolfram Sang
2014-10-28 16:40 ` [PATCH RESEND 4/4] coccinelle: api: add spatch to prevent unnecessary .owner Wolfram Sang
2014-10-28 20:58   ` Julia Lawall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®