[PATCH 0/2] IMSM Checkpointing Bug Fix Series (3)
[PATCH 0/2] IMSM Checkpointing Bug Fix Series (3)
am 10.06.2011 17:56:21 von adam.kwolek
The following series implements fixes for potential problems found
using Klocwork.
For complete solution all sent patches (7) needs to be applied:
1. imsm: FIX: Cannot create volume
2. FIX: Cannot create volume
3. imsm: FIX: Use function to obtain array layout
4. imsm: FIX: Disable automatic metadata rollback for broken reshape
5. imsm: FIX: Raid5 data corruption data recovering from backup
6. imsm: Fix: klocwork: targets variable can be used uninitialized
7. imsm: FIX: klocwork: passed dev pointer to is_gen_migration() can be NULL
IMSM Checkpointing Status: All unit tests passed
BR
Adam
---
Adam Kwolek (2):
imsm: FIX: klocwork: passed dev pointer to is_gen_migration() can be NULL
imsm: Fix: klocwork: targets variable can be used uninitialized
super-intel.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
--
Signature
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] imsm: Fix: klocwork: targets variable can be used
am 10.06.2011 17:56:30 von adam.kwolek
When target_offsets allocation fails execution goes to abort label,
where elements from targets table are closed.
Initialize targets table after allocation.
Signed-off-by: Adam Kwolek
---
super-intel.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 40fd940..8dd0805 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -7724,6 +7724,9 @@ int save_backup_imsm(struct supertype *st,
if (!targets)
goto abort;
+ for (i = 0; i < new_disks; i++)
+ targets[i] = -1;
+
target_offsets = malloc(new_disks * sizeof(unsigned long long));
if (!target_offsets)
goto abort;
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] imsm: FIX: klocwork: passed dev pointer to
am 10.06.2011 17:56:39 von adam.kwolek
Pointer dev2 passed in write_super_imsm():4451 can be equal to NULL.
Signed-off-by: Adam Kwolek
---
super-intel.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/super-intel.c b/super-intel.c
index 8dd0805..3b4010d 100644
--- a/super-intel.c
+++ b/super-intel.c
@@ -5321,6 +5321,9 @@ static int update_subarray_imsm(struct supertype *st, char *subarray,
static int is_gen_migration(struct imsm_dev *dev)
{
+ if (dev == NULL)
+ return 0;
+
if (!dev->vol.migr_state)
return 0;
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/2] imsm: FIX: klocwork: passed dev pointer tois_gen_migration() can be NULL
am 14.06.2011 04:50:53 von NeilBrown
On Fri, 10 Jun 2011 17:56:39 +0200 Adam Kwolek wrote:
> Pointer dev2 passed in write_super_imsm():4451 can be equal to NULL.
>
> Signed-off-by: Adam Kwolek
> ---
>
> super-intel.c | 3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/super-intel.c b/super-intel.c
> index 8dd0805..3b4010d 100644
> --- a/super-intel.c
> +++ b/super-intel.c
> @@ -5321,6 +5321,9 @@ static int update_subarray_imsm(struct supertype *st, char *subarray,
>
> static int is_gen_migration(struct imsm_dev *dev)
> {
> + if (dev == NULL)
> + return 0;
> +
> if (!dev->vol.migr_state)
> return 0;
>
Thanks. I have applied this and most of the others you sent.
NeilBrown
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html