Re: [PATCH -mm 3/4] Audit: start not to use SELinux exported symbols

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Paul Moore
Date: Wednesday, February 27, 2008 - 9:00 am

On Tuesday 26 February 2008 6:28:08 pm Ahmed S. Darwish wrote:

In the future, such patches should probably also be CC'd to the audit 
list.


This is a nit, but you used spaces between the "*" and "In case ..." 
where the rest of the files uses tabs.  When in doubt, try and stick 
with whatever formatting the rest of the source file uses.


This next part isn't your fault, but you're touching the code so I'm 
going to point it out and suggest you fix it while you are at it :)

If you look at how kfree()/security_release_secctx() is called in the 
above two functions you notice how it is inconsistent: it is only 
called on success in the first case, but called regardless in the 
second.  Make this consistent, preferably using the approach taken in 
the first case (only call it on success).


Same comment about security_release_secctx() applies here.


Same thing.


You forgot to convert the matching kfree() call to a 
security_release_secctx() call.  Also it might be nice to change the 
context variable name from "s" to "ctx", but some ornery folks might 
whine about that ...


Only call the release routine on success.


Here too.


One last time.

-- 
paul moore
linux security @ hp
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH -mm 2/4] SELinux: Remove various exported symbols, Ahmed S. Darwish, (Tue Feb 26, 4:25 pm)
Re: [PATCH -mm 3/4] Audit: start not to use SELinux export ..., Paul Moore, (Wed Feb 27, 9:00 am)
Re: [PATCH -mm 3/4] Audit: start not to use SELinux export ..., Ahmed S. Darwish, (Wed Feb 27, 10:11 am)