lkml.org 
[lkml]   [2019]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 4.14 013/105] scsi: bnx2fc: Fix NULL dereference in error handling
    Date
    4.14-stable review patch.  If anyone has any objections, please let me know.

    ------------------

    [ Upstream commit 9ae4f8420ed7be4b13c96600e3568c144d101a23 ]

    If "interface" is NULL then we can't release it and trying to will only
    lead to an Oops.

    Fixes: aea71a024914 ("[SCSI] bnx2fc: Introduce interface structure for each vlan interface")
    Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
    Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    ---
    drivers/scsi/bnx2fc/bnx2fc_fcoe.c | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
    index 6844ba361616..89f09b122135 100644
    --- a/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
    +++ b/drivers/scsi/bnx2fc/bnx2fc_fcoe.c
    @@ -2372,7 +2372,7 @@ static int _bnx2fc_create(struct net_device *netdev,
    if (!interface) {
    printk(KERN_ERR PFX "bnx2fc_interface_create failed\n");
    rc = -ENOMEM;
    - goto ifput_err;
    + goto netdev_err;
    }

    if (is_vlan_dev(netdev)) {
    --
    2.19.1


    \
     
     \ /
      Last update: 2019-01-11 15:31    [W:4.870 / U:0.264 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site