Created attachment 278743 [details]
I have a "Kingston DT Ultimate G3" USB flash drive that was functioning normally with past kernels. In newer ones, however, it shows up as having write protection enabled, making it unable to be written to.
I have verified that it is not a hardware issue, by testing it on various computers with different operating systems, and the issue only happened on stable kernel 4.14 and newer. Other kernels are possibly affected too, but I haven't checked it.
Bisecting the kernel showed that commit 20bd1d026aacc5399464f8328f305985c493cde3 , is the cause of this issue.
It appears that the normal behaviour of this flash drive is to first show up as being write protected, and presumably after it is done initialising, it disables write protection.
I believe that the commit mentioned above doesn't account for drives that may disable write protection later on, resulting in this issue.
Running "blockdev --setrw /dev/sdX && blockdev --rereadpt /dev/sdX" allows the drive to continue functioning normally and be written to until it gets unplugged.
Reverting the changes done by that commit also resolves this issue.
Attached is the kernel (4.18.7) log during device init, and an attempt to mount the partition on it immediately afterwards.