nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error
Subsystems (3)
Vyacheslav Dubeyko
maintainerPATCH v3 1/2 nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error
From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH v3 1/2] nilfs2: remove double bio_put() in nilfs_end_bio_write() for BIO_EOPNOTSUPP error
This patch removes double call of bio_put() in nilfs_end_bio_write() for the case of BIO_EOPNOTSUPP error detection. The issue was found by Dan Carpenter and he suggests first version of the fix too.
--- fs/nilfs2/segbuf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
fs/nilfs2/segbuf.c +1 -2
@@ -345,8 +345,7 @@ static void nilfs_end_bio_write(struct bio *bio, int err)if (err = -EOPNOTSUPP ) {set_bit (BIO_EOPNOTSUPP , &bio->bi_flags); -bio_put (bio); -/* to be detected by submit_seg_bio() */ +/* to be detected by nilfs_segbuf_submit_bio() */ }if (!uptodate)
Signature · 1 line
1.7.9.5
Quoted 10 lines · Vyacheslav Dubeyko
From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH v3 1/2] nilfs2: remove doublebio_put()innilfs_end_bio_write()forBIO_EOPNOTSUPPerrorThis patch removes double call of
bio_put()innilfs_end_bio_write()for the case ofBIO_EOPNOTSUPPerror detection. The issue was found by Dan Carpenter and he suggests first version of the fix too.Reported-by Dan Carpenter <[email protected]>Signed-off-by Vyacheslav Dubeyko <[email protected]>CC Ryusuke Konishi <[email protected]>
I tested this patch by inserting a pseudo EOPNOTSUPP error, and this actually fixed a crach "kernel BUG at fs/bio.c:498!" due to reference count underflow of bio_put() that nilfs_end_bio_write() induced.
Andrew, please pick up this bug-fix preferably for this cycle.
Thanks,
Ryusuke Konishi
Quoted 27 lines
--- fs/nilfs2/segbuf.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)fs/nilfs2/segbuf.c +1
-2@@ -345,8 +345,7 @@ static void nilfs_end_bio_write(struct bio *bio, int err)if (err = -EOPNOTSUPP ) {set_bit (BIO_EOPNOTSUPP , &bio->bi_flags); -bio_put (bio); -/* to be detected by submit_seg_bio() */ +/* to be detected by nilfs_segbuf_submit_bio() */ }if (!uptodate)Signature · 8 lines
1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 15 lines · On Wed, 14 Aug 2013 01:51:48 +0900 (JST) Ryusuke Konishi…
Quoted 10 lines · Vyacheslav Dubeyko
From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH v3 1/2] nilfs2: remove doublebio_put()innilfs_end_bio_write()forBIO_EOPNOTSUPPerrorThis patch removes double call of
bio_put()innilfs_end_bio_write()for the case ofBIO_EOPNOTSUPPerror detection. The issue was found by Dan Carpenter and he suggests first version of the fix too.Reported-by Dan Carpenter <[email protected]>Signed-off-by Vyacheslav Dubeyko <[email protected]>CC Ryusuke Konishi <[email protected]>Acked-by Ryusuke Konishi <[email protected]>Tested-by Ryusuke Konishi <[email protected]>
Quoted 6 lines
I tested this patch by inserting a pseudo EOPNOTSUPP error, and this actually fixed a crach "kernel BUG at
fs/bio.c:498!" due to reference count underflow ofbio_put()thatnilfs_end_bio_write()induced.Andrew, please pick up this bug-fix preferably for this cycle.
Should we apply the fix to earlier kernel versions and if so, how far back in time does it go?
Thanks.
Quoted 22 lines · Andrew Morton
Quoted 20 lines · On Wed, 14 Aug 2013 01:51:48 +0900 (JST) Ryusuke Konishi…
Quoted 10 lines · Vyacheslav Dubeyko
From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH v3 1/2] nilfs2: remove doublebio_put()innilfs_end_bio_write()forBIO_EOPNOTSUPPerrorThis patch removes double call of
bio_put()innilfs_end_bio_write()for the case ofBIO_EOPNOTSUPPerror detection. The issue was found by Dan Carpenter and he suggests first version of the fix too.Reported-by Dan Carpenter <[email protected]>Signed-off-by Vyacheslav Dubeyko <[email protected]>CC Ryusuke Konishi <[email protected]>Acked-by Ryusuke Konishi <[email protected]>Tested-by Ryusuke Konishi <[email protected]>I tested this patch by inserting a pseudo EOPNOTSUPP error, and this actually fixed a crach "kernel BUG at
fs/bio.c:498!" due to reference count underflow ofbio_put()thatnilfs_end_bio_write()induced.
Quoted 4 lines
Quoted 1 line
Andrew, please pick up this bug-fix preferably for this cycle.
Should we apply the fix to earlier kernel versions and if so, how far back in time does it go?
Yes, I think it should also be applied to earlier versions.
I looked back ealiear versions.
This bug, unfortunately, comes from the original version (2.6.30), and the patch could be applied to all versions.
Regards,
Ryusuke Konishi
A message that is not in the archive (sent off-list or not yet received): 20130815.084112.220043622.konishi.ryusuke-Zyj7fXuS5i5L9jVzuh4AOg@public.gmane.org
Quoted 28 lines · On Thu, 15 Aug 2013 08:41:12 +0900 (JST) Ryusuke Konishi…
Quoted 22 lines · Andrew Morton
Quoted 20 lines · On Wed, 14 Aug 2013 01:51:48 +0900 (JST) Ryusuke Konishi…
Quoted 10 lines · Vyacheslav Dubeyko
From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH v3 1/2] nilfs2: remove doublebio_put()innilfs_end_bio_write()forBIO_EOPNOTSUPPerrorThis patch removes double call of
bio_put()innilfs_end_bio_write()for the case ofBIO_EOPNOTSUPPerror detection. The issue was found by Dan Carpenter and he suggests first version of the fix too.Reported-by Dan Carpenter <[email protected]>Signed-off-by Vyacheslav Dubeyko <[email protected]>CC Ryusuke Konishi <[email protected]>Acked-by Ryusuke Konishi <[email protected]>Tested-by Ryusuke Konishi <[email protected]>I tested this patch by inserting a pseudo EOPNOTSUPP error, and this actually fixed a crach "kernel BUG at
fs/bio.c:498!" due to reference count underflow ofbio_put()thatnilfs_end_bio_write()induced.Quoted 4 lines
Quoted 1 line
Andrew, please pick up this bug-fix preferably for this cycle.
Should we apply the fix to earlier kernel versions and if so, how far back in time does it go?
Quoted 6 lines
Yes, I think it should also be applied to earlier versions.
I looked back ealiear versions.
This bug, unfortunately, comes from the original version (2.6.30), and the patch could be applied to all versions.
OK. And what about nilfs2-fix-issue-with-counting-number-of-bio-requests-for-bio_eopnotsupp-error-detection.patch?
Quoted 32 lines · Andrew Morton
Quoted 30 lines · On Thu, 15 Aug 2013 08:41:12 +0900 (JST) Ryusuke Konishi wrote:
Quoted 22 lines · Andrew Morton
Quoted 20 lines · On Wed, 14 Aug 2013 01:51:48 +0900 (JST) Ryusuke Konishi…
Quoted 10 lines · Vyacheslav Dubeyko
From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH v3 1/2] nilfs2: remove doublebio_put()innilfs_end_bio_write()forBIO_EOPNOTSUPPerrorThis patch removes double call of
bio_put()innilfs_end_bio_write()for the case ofBIO_EOPNOTSUPPerror detection. The issue was found by Dan Carpenter and he suggests first version of the fix too.Reported-by Dan Carpenter <[email protected]>Signed-off-by Vyacheslav Dubeyko <[email protected]>CC Ryusuke Konishi <[email protected]>Acked-by Ryusuke Konishi <[email protected]>Tested-by Ryusuke Konishi <[email protected]>I tested this patch by inserting a pseudo EOPNOTSUPP error, and this actually fixed a crach "kernel BUG at
fs/bio.c:498!" due to reference count underflow ofbio_put()thatnilfs_end_bio_write()induced.Quoted 4 lines
Quoted 1 line
Andrew, please pick up this bug-fix preferably for this cycle.
Should we apply the fix to earlier kernel versions and if so, how far back in time does it go?
Yes, I think it should also be applied to earlier versions.
Quoted 7 lines
Quoted 4 lines
I looked back ealiear versions.
This bug, unfortunately, comes from the original version (2.6.30), and the patch could be applied to all versions.
OK. And what about nilfs2-fix-issue-with-counting-number-of-bio-requests-for-bio_eopnotsupp-error-detection.patch?
This one should also be applied to ealier versions, but it was applicable only to 2.6.33 and later due to change at 2.6.33.
Regards,
Ryusuke Konishi