| To: | Jesper Juhl <jesper.juhl@xxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH][RFC][resend] potential NULL pointer deref in XFS on failed mount |
| From: | Shailendra Tripathi <stripathi@xxxxxxxxx> |
| Date: | Thu, 16 Nov 2006 13:44:05 -0800 |
| Cc: | linux-kernel@xxxxxxxxxxxxxxx, xfs@xxxxxxxxxxx, xfs-masters@xxxxxxxxxxx, nathans@xxxxxxx, Andrew Morton <akpm@xxxxxxxx> |
| In-reply-to: | <9a8748490611161343x44e759acs9b70247c84452ba5@xxxxxxxxxxxxxx> |
| References: | <200611162218.26945.jesper.juhl@xxxxxxxxx> <455CD6C8.5030907@xxxxxxxxx> <9a8748490611161343x44e759acs9b70247c84452ba5@xxxxxxxxxxxxxx> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
| User-agent: | Thunderbird 1.5.0.8 (X11/20061025) |
Jesper Juhl wrote: 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.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. Your choice.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH] (and bad attr2 bug) - pack xfs_sb_t for 64-bit arches, Eric Sandeen |
|---|---|
| Next by Date: | Re: [PATCH] (and bad attr2 bug) - pack xfs_sb_t for 64-bit arches, Eric Sandeen |
| Previous by Thread: | Re: [PATCH][RFC][resend] potential NULL pointer deref in XFS on failed mount, Shailendra Tripathi |
| Next by Thread: | Re: [PATCH][RFC][resend] potential NULL pointer deref in XFS on failed mount, Jesper Juhl |
| Indexes: | [Date] [Thread] [Top] [All Lists] |