lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <45466D6C.802@ce.jp.nec.com>
Date:	Mon, 30 Oct 2006 16:23:56 -0500
From:	"Jun'ichi Nomura" <j-nomura@...jp.nec.com>
To:	torvalds@...l.org, akpm@...l.org, rdunlap@...otime.net,
	mst@...lanox.co.il, linux-kernel@...r.kernel.org
CC:	bunk@...sta.de, pavel@...e.cz, len.brown@...el.com,
	linux-acpi@...r.kernel.org, linux-pm@...l.org, martin@...enz.eu.org
Subject: [PATCH 2.6.19-rc3] (2/2) clean up add_bd_holder()

Hi,

This is an additional clean-up to "[PATCH 2.6.19-rc3] (1/2)
fix bd_claim_by_kobject error handling".

add_bd_holder() is called from bd_claim_by_kobject to
put a given struct bd_holder in the list if there is no
matching entry.

There are 3 possible results of add_bd_holder():
  1. there is no matching entry and add the given one to the list
  2. there is matching entry, so just increment reference count of
     the existing one
  3. something failed during its course

1 and 2 are success. But for the case 2, someone has to free
the unused struct bd_holder.
Current 2.6.19-rc3 code frees it inside of add_bd_holder and
returns same value 0 for both cases 1 and 2.
However, it's natural and less error-prone if caller frees it
since it's allocated by the caller.

The attached patch separates the function in 2 parts to make things
clear. The patch depends on the previous fix.

Please consider to apply.

Thanks,
-- 
Jun'ichi Nomura, NEC Corporation of America

View attachment "clean-up-add_bd_holder.patch" of type "text/x-patch" (3300 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ