[Top][All Lists]

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

Re: [Qemu-devel] [PATCH v4 3/5] megasas: bugfix

From: Cao jin
Subject: Re: [Qemu-devel] [PATCH v4 3/5] megasas: bugfix
Date: Sat, 9 Apr 2016 21:07:45 +0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0

On 04/08/2016 03:16 PM, Markus Armbruster wrote:
Please use a more descriptive title.  Suggest "megasas: Fix

Cao jin <address@hidden> writes:

msi_init returns non-zero value on both failure and success

This is a sentence, should end with a period.

Bug's impact?  Here's my guess.

msi_init() either succeeds and returns 0x50, or fails and returns a
negative errno.  If it succeeds, we mistakenly clear
MEGASAS_MASK_USE_MSI.  Its only use is in megasas_scsi_uninit(), via
megasas_use_msi().  There, we fail to msi_uninit() on unrealize due to
the bug.

I figure that's harmless if we destroy the device next.  This is the
common case.

If we don't destroy it, and then realize it again, msi_init() fails,

FYI: if realize it again, I guess msi_init() won`t be executed again, because megasas_use_msi() will fail first.

because there's no space at 0x50: the MSI capability we neglected to
delete is still there.  We report the problem to the user, then realize
the device anyway (I hate that, but it's a separate issue).

Yours Sincerely,

Cao jin

reply via email to

[Prev in Thread] Current Thread [Next in Thread]