public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Levente Kurusa <levex@linux.com>
To: Borislav Petkov <bp@alien8.de>
Cc: Ingo Molnar <mingo@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	Tony Luck <tony.luck@intel.com>, "H. Peter Anvin" <hpa@zytor.com>,
	x86@kernel.org, EDAC <linux-edac@vger.kernel.org>,
	LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86: mcheck: call put_device on device_register failure
Date: Sat, 30 Nov 2013 13:37:35 +0100	[thread overview]
Message-ID: <5299DC0F.8020500@linux.com> (raw)
In-Reply-To: <20131130120827.GE4323@pd.tnic>

2013-11-30 13:08 keltezéssel, Borislav Petkov írta:
> On Sat, Nov 30, 2013 at 12:44:59PM +0100, Levente Kurusa wrote:
>> Yes, I saw that as well. By that I meant that by doing some identifier
>> searches for device_register and then checking whether they call
>> put_device and have device_release registered. Also, I wonder if it
>> would be beneficial to have a generic device_release? Most of the
>> drivers I quickly swept through only call kfree(). Wouldn't a generic
>> one save some space?
> 
> Again, I wouldn't waste my time with hypothetical issues which never
> happen - there are many other, real issues which would rather need
> attention than what-if ones.
> 
> About saving space, that could be worth a try. If you can actually do
> that and show numbers to back it up, I'm sure people will have a look.
> And if you can't show any space savings, you'll still have learned stuff
> along the way.
> 
> But don't ask me about whether it makes sense to have a generic
> device_release - I'm no driver core and am not even trying. You could
> try to answer that question yourself, btw. :)

Okay, I will, thanks for the tips! :)
> 
>> Yes, I do that daily usually, but most of the time I only get some
>> uninitialized warnings. :-)
> 
> You can always try to understand why such warnings get issued and maybe
> even fix them if they're legit and the compiler is right. Also, look
> through git log for examples how others have fixed such warnings.
Yes, but there are some fake one where for example it doesn't recognize the
pci_read_config_byte call as something which could write to its args. So most
of them are fake warnings.

> 
> For example, sometimes changing code flow instead of simply shutting
> up the variable is much better. But in order to do that, you'd need to
> understand the code first and try to change it so that it doesn't break
> and the warning disappears. This is a very good way, IMO, to get to
> really understand what the code does and learn from others.
> 
> Another good exercise is trying to boot those random kernels with kvm -
> that can catch a bunch of issues too.
> 
> The save-space experiment you can also quickly test with kvm. By now you
> probably are catching my drift: testing kernels with kvm is awesome! :-)
I will try kvm, didn't use that before. :p

> 
>> What does that do? Never heard of it yet.
> 
> Well, you can have a look: scripts/Makefile.build

Ahh, now I see. Just didn't know where to look.

> 
> :-)
> 
> Good luck!
Thank you and for your time! :)

-- 
Regards,
Levente Kurusa

  reply	other threads:[~2013-11-30 12:37 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-29 20:28 [PATCH] x86: mcheck: call put_device on device_register failure Levente Kurusa
2013-11-29 20:56 ` Borislav Petkov
2013-11-30  7:30   ` Levente Kurusa
2013-11-30 11:12     ` Borislav Petkov
2013-11-30 11:25       ` Levente Kurusa
2013-11-30 11:32         ` Borislav Petkov
2013-11-30 11:44           ` Levente Kurusa
2013-11-30 12:08             ` Borislav Petkov
2013-11-30 12:37               ` Levente Kurusa [this message]
2013-12-03  2:23       ` Chen, Gong
2013-12-03 17:01         ` Borislav Petkov
2013-12-04  7:38           ` Chen, Gong
2013-12-04 18:39             ` Levente Kurusa
2013-12-05  2:57               ` Chen, Gong
2013-12-05 11:18                 ` Levente Kurusa

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=5299DC0F.8020500@linux.com \
    --to=levex@linux.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@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