| To: | tinguely@xxxxxxx |
|---|---|
| Subject: | Re: [PATCH 3/3] xfs: zero allocation_args on the kernel stack |
| From: | Dave Chinner <david@xxxxxxxxxxxxx> |
| Date: | Thu, 20 Sep 2012 09:41:02 +1000 |
| Cc: | xfs@xxxxxxxxxxx |
| In-reply-to: | <20120919163145.587098223@xxxxxxx> |
| References: | <20120919163133.097340199@xxxxxxx> <20120919163145.587098223@xxxxxxx> |
| User-agent: | Mutt/1.5.21 (2010-09-15) |
On Wed, Sep 19, 2012 at 11:31:36AM -0500, tinguely@xxxxxxx wrote:
> The allocation argument structures is created on the kernel stack space. This
> patch makes sure the userdata variable is always initialized.
>
> The better solution is always memset to 0 or "= { 0 }" the xfs_alloc_arg
Yes, please do that and remove all the initialisations to zero
instead. It's much easier to maintain in future if new additions
to structures are automaticlly zeroed by the code that uses it...
> and xfs_bmalloca structures. I believe there will only be 4 places that need
> this memset change.
The only definition of xfs_bmalloca (in xfs_bmapi_write) is already
zeroed:
struct xfs_bmalloca bma = { 0 }; /* args for xfs_bmap_alloc */
Cheers,
Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 0/3] xfs: allocation worker causes freelist buffer lock hang, Dave Chinner |
|---|---|
| Next by Date: | RE: Writeback Stalls, Markus Stockhausen |
| Previous by Thread: | [PATCH 3/3] xfs: zero allocation_args on the kernel stack, tinguely |
| Next by Thread: | [PATCH 3/3 v2] xfs: zero allocation_args on the kernel stack, Mark Tinguely |
| Indexes: | [Date] [Thread] [Top] [All Lists] |