mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Wolfram Sang <wsa@the-dreams.de>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org, Julia Lawall <julia.lawall@lip6.fr>,
	Wolfram Sang <wsa@the-dreams.de>
Subject: [PATCH RESEND 0/4] platform: fix accidently erasing .owner
Date: Tue, 28 Oct 2014 17:40:39 +0100	[thread overview]
Message-ID: <1414514443-28943-1-git-send-email-wsa@the-dreams.de> (raw)

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


             reply	other threads:[~2014-10-28 16:40 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-28 16:40 Wolfram Sang [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1414514443-28943-1-git-send-email-wsa@the-dreams.de \
    --to=wsa@the-dreams.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®