Uploaded image for project: 'Lustre'
  1. Lustre
  2. LU-19526

iov_iter_is_aligned() should be checking actual buffer address

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Medium
    • None
    • None
    • None
    • 3
    • 9223372036854775807

    Description

      reading iov_iter_is_aligned() I noticed the following code:

      static inline bool iov_iter_is_aligned(const struct iov_iter *i,
      				       unsigned addr_mask, unsigned len_mask)
      {
      	if (likely(iter_is_ubuf(i))) {
      		if (i->count & len_mask)
      			return false;
      		if ((unsigned long)(iter_iov(i) + i->iov_offset) & addr_mask)
      			return false;
      

      notice iter_iov returns struct iovec *, not address of the data.

      Attachments

        Activity

          People

            wc-triage WC Triage
            bzzz Alex Zhuravlev
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated: