+ test_firmware-fix-error-return-getting-clobbered.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: lib/test_firmware.c: fix error return getting clobbered
has been added to the -mm tree.  Its filename is
     test_firmware-fix-error-return-getting-clobbered.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/test_firmware-fix-error-return-getting-clobbered.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/test_firmware-fix-error-return-getting-clobbered.patch

Before you just go and hit "reply", please:
   a) Consider who else should be cc'ed
   b) Prefer to cc a suitable mailing list as well
   c) Ideally: find the original patch on the mailing list and do a
      reply-to-all to that, adding suitable additional cc's

*** Remember to use Documentation/process/submit-checklist.rst when testing your code ***

The -mm tree is included into linux-next and is updated
there every 3-4 working days

------------------------------------------------------
From: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Subject: lib/test_firmware.c: fix error return getting clobbered

In the case where eq->fw->size > PAGE_SIZE the error return rc is being
set to EINVAL however this is being overwritten to rc = req->fw->size
because the error exit path via label 'out' is not being taken.  Fix this
by adding the jump to the error exit path 'out'.

Detected by CoverityScan, CID#1453465 ("Unused value")

Link: http://lkml.kernel.org/r/20181019125801.4544-1-colin.king@xxxxxxxxxxxxx
Fixes: c92316bf8e94 ("test_firmware: add batched firmware tests")
Signed-off-by: Colin Ian King <colin.king@xxxxxxxxxxxxx>
Reviewed-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
Cc: Wei Yongjun <weiyongjun1@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 lib/test_firmware.c |    1 +
 1 file changed, 1 insertion(+)

--- a/lib/test_firmware.c~test_firmware-fix-error-return-getting-clobbered
+++ a/lib/test_firmware.c
@@ -837,6 +837,7 @@ static ssize_t read_firmware_show(struct
 	if (req->fw->size > PAGE_SIZE) {
 		pr_err("Testing interface must use PAGE_SIZE firmware for now\n");
 		rc = -EINVAL;
+		goto out;
 	}
 	memcpy(buf, req->fw->data, req->fw->size);
 
_

Patches currently in -mm which might be from colin.king@xxxxxxxxxxxxx are

test_firmware-fix-error-return-getting-clobbered.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux