scsi: ses: Don't attach if enclosure has no components
stable inclusion from stable-v5.10.173 commit d68937dfc73ee7f61cf3424fa3225be93cacaa00 category: bugfix bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3 Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d68937dfc73ee7f61cf3424fa3225be93cacaa00 -------------------------------- commit 3fe97ff3 upstream. An enclosure with no components can't usefully be operated by the driver (since effectively it has nothing to manage), so report the problem and don't attach. Not attaching also fixes an oops which could occur if the driver tries to manage a zero component enclosure. [mkp: Switched to KERN_WARNING since this scenario is common] Link: https://lore.kernel.org/r/c5deac044ac409e32d9ad9968ce0dcbc996bfc7a.camel@linux.ibm.com Cc: stable@vger.kernel.org Reported-by:Ding Hui <dinghui@sangfor.com.cn> Signed-off-by:
James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by:
Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by:
Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment