lkml.org 
[lkml]   [2014]   [Jan]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [GIT] Security subsystem changes for 3.14
From
Since I got a conflict on this one and had to look at the code:

On Mon, Jan 20, 2014 at 5:11 AM, James Morris <jmorris@namei.org> wrote:
>
> Peter Huewe (5):
> tpm/tpm_ppi: Check return value of acpi_get_name

that commit looks wrong (and mainline had fixed it correctly in the meantime).

The problem with

+ if (ACPI_FAILURE(status))
+ return status;

is that this is a callback for acpi_walk_namespace(), and returning a
failure status means that the walk will be interrupted.

So you actually want to return AE_OK if the acpi_get_name() call
fails, because that just skips the failing node. Returning failure
will skip *all* the nodes.

In practice it probably doesn't matter (acpi_get_name() isn't supposed
to fail), but I thought I'd point it out since I had to stare at the
conflict.

Linus


\
 
 \ /
  Last update: 2014-01-21 19:01    [W:0.094 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site