[PATCH 5.12 231/677] mtd: require write permissions for locking and badblock ioctls