When remounting with the no_bulk_read option,
there is a problem accessing the "bulk_read buffer(bu.buf)"
which has already been freed.
If the bulk_read option is enabled,
ubifs_tnc_bulk_read uses the pre-allocated bu.buf.
While bu.buf is being used by ubifs_tnc_bulk_read,
remounting with no_bulk_read frees bu.buf.
So I added code to check the use of "bu.buf" to avoid this situation.
------
I tested as follows(kernel v3.18) :
Use the script to repeat "no_bulk_read <-> bulk_read"
remount.sh
#!/bin/sh
while true do;
mount -o remount,no_bulk_read ${MOUNT_POINT};
sleep 1;
mount -o remount,bulk_read ${MOUNT_POINT};
sleep 1;
done