Public bug reported: [Impact] This is a code correctness issue found during code review. From my reading of the code, the spin_lock will always happen to have just been devm_kcalloc'd, which uses GFP_ZERO, before spin_lock_init() needs to be called. That may make the current code safe, but relying on that coincidence seems dangerous. There's also various debugging facilities in the kernel that appear to rely on proper spinlock initialization, and those may currently be broken.
[Test Case] Boot test to look for regressions. [Fix] Backport a fix from the scsi maintainer's 4.19 queue which adds a spin_lock_init() call. [Regression Risk] The fix is limited to the hisi_sas driver and is obviously correct. ** Affects: linux (Ubuntu) Importance: Undecided Assignee: dann frazier (dannf) Status: In Progress ** Affects: linux (Ubuntu Bionic) Importance: Undecided Assignee: dann frazier (dannf) Status: In Progress ** Also affects: linux (Ubuntu Bionic) Importance: Undecided Status: New ** Changed in: linux (Ubuntu) Status: New => In Progress ** Changed in: linux (Ubuntu Bionic) Status: New => In Progress ** Changed in: linux (Ubuntu) Assignee: (unassigned) => dann frazier (dannf) ** Changed in: linux (Ubuntu Bionic) Assignee: (unassigned) => dann frazier (dannf) -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1777734 Title: hisi_sas: Add missing PHY spinlock init To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1777734/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs