Bug 285851 - cciss: "out of memory" message on boot
cciss: "out of memory" message on boot
Status: CLOSED DUPLICATE of bug 249104
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: kernel (Show other bugs)
5.1
All Linux
medium Severity high
: ---
: ---
Assigned To: Red Hat Kernel Manager
Martin Jenner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-09-11 09:09 EDT by Masaki MAENO
Modified: 2007-11-30 17:07 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-09-12 08:45:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
cciss_revalidate fix patch (805 bytes, patch)
2007-09-11 23:43 EDT, Masaki MAENO
no flags Details | Diff

  None (edit)
Description Masaki MAENO 2007-09-11 09:09:34 EDT
Description of problem:

A message of "out of message" is out on boot (2.6.18-36.el5).
The system starts without trouble, but this message is unpleasant for everyone.

HP CISS Driver is v 3.6.16-RH1 in RHEL5.1beta.

But, the message is not out for HP CISS Driver (v 3.6.14-RH1) in RHEL5.0.

Please confirm its problem to HP Engineer.

How reproducible:

Boot by cciss disk.

Steps to Reproduce:

1. boot
  
Actual results:

# dmesg
 ...
SCSI subsystem initialized
HP CISS Driver (v 3.6.16-RH1)
ACPI: PCI Interrupt 0000:06:00.0[A] -> GSI 16 (level, low) -> IRQ 169
cciss0: <0x3230> at PCI 0000:06:00.0 IRQ 114 using DAC
      blocks= 860051248 block_size= 512
      heads= 255, sectors= 32, cylinders= 860051249

cciss: out of memory  <<<<<<< driver/block/cciss.c:cciss_revalidate() 
                              size_buff is NULL (cciss driver code changed.)
 cciss/c0d0: p1 p2 p3 p4 < p5 p6 p7 p8 p9 p10 >
usb 5-1: new full speed USB device using uhci_hcd and address 2
libata version 2.21 loaded.
usb 5-1: configuration #1 chosen from 1 choice
 ...

Expected results:

The following message is not output.
 ...
cciss: out of memory  <<<<<<< driver/block/cciss.c:cciss_revalidate() 
                              size_buff is NULL (cciss driver code changed.)
 ...

Additional info:

Hardware: DL360G5 (Firmware v7.80)
Comment 1 Masaki MAENO 2007-09-11 20:49:28 EDT
I had made a mistake. I correct it.

>  <<<<<<< driver/block/cciss.c:cciss_revalidate()        <<<<< 2.6.18-8.el5
>          size_buff is NULL (cciss driver code changed.)
inq_buff is NULL <<<<< 2.6.18-36.el5

======
2002 static int cciss_revalidate(struct gendisk *disk)
2003 {
2004         ctlr_info_t *h = get_host(disk);
2005         drive_info_struct *drv = get_drv(disk);
2006         int logvol;
2007         int FOUND = 0;
2008         unsigned int block_size;
2009         sector_t total_size;
2010         InquiryData_struct *inq_buff = NULL;
2011 
        ...
2021 
2022         if (inq_buff == NULL) {
2023                 printk(KERN_WARNING "cciss: out of memory\n");
2024                 return 1;
2025         }
        ...
======
Comment 2 Masaki MAENO 2007-09-11 21:38:35 EDT
This problem is simple, easy (stupid bug) and "very serious".
kmalloc() has been only forgotten before inq_buff check whether NULL or not.

I explain it is a serious problem.
Even if it changes the geometry on cciss-disk, it is not actually updated (
revalidate_disk() = cciss_revalidate() ). 

2018 
2019         if (!FOUND)
2020                 return 1;
2021 
    +        inq_buff = kmalloc(sizeof(InquiryData_struct), GFP_KERNEL);
2022         if (inq_buff == NULL) {
2023                 printk(KERN_WARNING "cciss: out of memory\n");
2024                 return 1;

Comment 3 Masaki MAENO 2007-09-11 23:43:30 EDT
Created attachment 193171 [details]
cciss_revalidate fix patch
Comment 4 Prarit Bhargava 2007-09-12 08:45:06 EDT

*** This bug has been marked as a duplicate of 249104 ***

Note You need to log in before you can comment on or make changes to this bug.