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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <455CDBA5.5070809@agami.com>
Date:	Thu, 16 Nov 2006 13:44:05 -0800
From:	Shailendra Tripathi <stripathi@...mi.com>
To:	Jesper Juhl <jesper.juhl@...il.com>
CC:	linux-kernel@...r.kernel.org, xfs@....sgi.com,
	xfs-masters@....sgi.com, nathans@....com,
	Andrew Morton <akpm@...l.org>
Subject: Re: [PATCH][RFC][resend] potential NULL pointer deref in XFS on failed
 mount

Jesper Juhl wrote:

> The reason I want to fix it in the freeing function is that many other
> functions in the kernel that free resources are safe to call with NULL
> pointers and this would make xfs_free_buftarg() follow that
> convention.  This would perhaps also allow for some cleanups in other
> places that call the function since then there's no longer a need for
> explicit NULL checks any more (haven't checked if there's anything to
> gain there though).
> I don't think the function call overhead matters much since this is in
> a case of a failed mount, so it should happen very rarely.
>
I agree with you.  However, cleanup functions should(/must?) check for  
NULL etc and
in this case it is already doing so for other cases. So, perhaps not 
required. Just a different viewpoint.
Your choice.

>> void
>> xfs_unmountfs_close(xfs_mount_t *mp, struct cred *cr)
>> {
>>        if (mp->m_logdev_targp && (mp->m_logdev_targp != 
>> mp->m_ddev_targp))
>>                 xfs_free_buftarg(mp->m_logdev_targp, 1);
>>         if (mp->m_rtdev_targp)
>>                 xfs_free_buftarg(mp->m_rtdev_targp, 1);
>>         xfs_free_buftarg(mp->m_ddev_targp, 0);
>> }
>>
>
>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ