From: Robert Richter <robert.richter@amd.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: LKML <linux-kernel@vger.kernel.org>,
oprofile-list <oprofile-list@lists.sourceforge.net>
Subject: Re: [GIT PULL] oprofile fixes for 3.2
Date: Mon, 19 Dec 2011 15:17:03 +0100 [thread overview]
Message-ID: <20111219141703.GG16765@erda.amd.com> (raw)
In-Reply-To: <20111219140049.GA9097@elte.hu>
On 19.12.11 15:00:49, Ingo Molnar wrote:
> + if (!count)
> + return 0;
> +
> retval = oprofilefs_ulong_from_user(&value, buf, count);
> if (retval)
> return retval;
>
> See the ugly and fragile pattern?
>
> This should *really* be solved via the
> oprofilefs_ulong_from_user() helper function, not by sprinkling
> the !count checks in half a dozen places ...
Hmm, I thought there was no way to leave the code path with count == 0
and retval. But thinking about it it would be possible with returning
count or errors < 0. Will improve the patch.
Thanks,
-Robert
--
Advanced Micro Devices, Inc.
Operating System Research Center
next prev parent reply other threads:[~2011-12-19 14:17 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-19 13:46 Robert Richter
2011-12-19 13:46 ` [PATCH] oprofile: Fix uninitialized memory access when writing to oprofilefs Robert Richter
2011-12-19 14:00 ` [GIT PULL] oprofile fixes for 3.2 Ingo Molnar
2011-12-19 14:17 ` Robert Richter [this message]
2011-12-19 15:38 ` [PATCH v2] oprofile: Fix uninitialized memory access when writing to Robert Richter
2011-12-19 16:19 ` Ingo Molnar
2011-12-20 8:57 ` [tip:perf/urgent] oprofile: Fix uninitialized memory access when writing to writing to oprofilefs tip-bot for Robert Richter
2011-12-22 15:15 ` [PATCH] oprofile, arm/sh: Fix oprofile_arch_exit() linkage issue Robert Richter
2011-12-23 13:19 ` [tip:perf/urgent] " tip-bot for Vladimir Zapolskiy
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=20111219141703.GG16765@erda.amd.com \
--to=robert.richter@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=oprofile-list@lists.sourceforge.net \
/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
Powered by JetHome