* [patch] e4defrag: relevant file fragmentation: fix arithmetic error as non-root
@ 2010-08-29 15:01 Andreas Rid
2010-09-01 8:09 ` Kazuya Mio
0 siblings, 1 reply; 2+ messages in thread
From: Andreas Rid @ 2010-08-29 15:01 UTC (permalink / raw)
To: k-mio; +Cc: linux-ext4
hi Kazuya Mio,
I found a bug on your patch "[RFC][PATCH V2 5/5] e4defrag: add solving relevant file fragmentation mode"
The variable "blocks_per_group" is only initialized as root cause of restrict access to the super-block.
As a non root user this cause an arithmetic error in function relevant_balloc.
diff --git a/misc/e4defrag.c b/misc/e4defrag.c
index 3f1df05..6022758 100644
--- a/misc/e4defrag.c
+++ b/misc/e4defrag.c
@@ -1662,14 +1662,15 @@ static int relevant_balloc(const char *file, int donor_fd,
/* Allocating all blocks in an extent group */
while (rest > 0) {
- int grp_offset;
- grp_offset = (pi.pi_pstart - first_data_block) % bpg;
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [patch] e4defrag: relevant file fragmentation: fix arithmetic error as non-root
2010-08-29 15:01 [patch] e4defrag: relevant file fragmentation: fix arithmetic error as non-root Andreas Rid
@ 2010-09-01 8:09 ` Kazuya Mio
0 siblings, 0 replies; 2+ messages in thread
From: Kazuya Mio @ 2010-09-01 8:09 UTC (permalink / raw)
To: Andreas Rid; +Cc: linux-ext4
Hi Andreas,
I will send the patch "[RFC][PATCH V2 5/5] e4defrag: add solving relevant file
fragmentation mode" includes your patches next time.
2010/08/30 0:01, Andreas Rid wrote:
> I found a bug on your patch "[RFC][PATCH V2 5/5] e4defrag: add solving relevant file fragmentation mode"
>
> The variable "blocks_per_group" is only initialized as root cause of restrict access to the super-block.
> As a non root user this cause an arithmetic error in function relevant_balloc
You're right. Thanks.
Regards,
Kazuya Mio
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-09-01 8:12 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-29 15:01 [patch] e4defrag: relevant file fragmentation: fix arithmetic error as non-root Andreas Rid
2010-09-01 8:09 ` Kazuya Mio
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).