Showing error 1850

User: Jiri Slaby
Error type: Invalid Pointer Dereference
Error type description: A pointer which is invalid is being dereferenced
File location: drivers/scsi/sym53c8xx_2/sym_glue.c
Line in file: 1421
Project: Linux Kernel
Project version: 2.6.28
Confirmation: Fixed by 07b9d81e849f64b990e943de6ad75b63dafe5a4b
Tools: Smatch (1.59)
Entered: 2013-09-11 08:47:26 UTC


Source:

1391         *  Fill Linux host instance structure
1392         *  and return success.
1393         */
1394        shost->max_channel        = 0;
1395        shost->this_id                = np->myaddr;
1396        shost->max_id                = np->maxwide ? 16 : 8;
1397        shost->max_lun                = SYM_CONF_MAX_LUN;
1398        shost->unique_id        = pci_resource_start(pdev, 0);
1399        shost->cmd_per_lun        = SYM_CONF_MAX_TAG;
1400        shost->can_queue        = (SYM_CONF_MAX_START-2);
1401        shost->sg_tablesize        = SYM_CONF_MAX_SG;
1402        shost->max_cmd_len        = 16;
1403        BUG_ON(sym2_transport_template == NULL);
1404        shost->transportt        = sym2_transport_template;
1405
1406        /* 53c896 rev 1 errata: DMA may not cross 16MB boundary */
1407        if (pdev->device == PCI_DEVICE_ID_NCR_53C896 && pdev->revision < 2)
1408                shost->dma_boundary = 0xFFFFFF;
1409
1410        spin_unlock_irqrestore(shost->host_lock, flags);
1411
1412        return shost;
1413
1414 reset_failed:
1415        printf_err("%s: FATAL ERROR: CHECK SCSI BUS - CABLES, "
1416                   "TERMINATION, DEVICE POWER etc.!\n", sym_name(np));
1417        spin_unlock_irqrestore(shost->host_lock, flags);
1418 attach_failed:
1419        if (!shost)
1420                return NULL;
1421        printf_info("%s: giving up ...\n", sym_name(np));
1422        if (np)
1423                sym_free_resources(np, pdev);
1424        scsi_host_put(shost);
1425
1426        return NULL;
1427 }
1428
1429
1430/*
1431 *    Detect and try to read SYMBIOS and TEKRAM NVRAM.
Show full sources